Usually we are use to spam comments manually but while checking spam Have you ever noticed that most spam comments have a very long url? what if we delete long URL from comments or mark them as spam and get our life at ease !
Above task (having URL above 50 charters will be marked as spam using below code, just paste the code below in your functions.php file.
function rkv_url_spamcheck( $approved , $commentdata ) {
return ( strlen( $commentdata['comment_author_url'] ) > 50 ) ? ‘spam’ : $approved;
}add_filter( ‘pre_comment_approved’, ‘rkv_url_spamcheck’, 99, 2 );
?>