WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Donncha O Caoimh (a11n) v0.5.5

Cookies for Comments

Sets a cookie on a random URL that is then checked when a comment is posted. If the cookie is missing the comment is marked as spam.

Cookies for Comments

The facts

Rating
4.9★ from 18
Active installs
10k+
Price
Free
Last updated
4 Jun 2019
Added
Mar 2008
Requires WP
3.1
Tested up to
WP 5.2.26
Downloads
108,540

Our analysis

AI-assisted

Cookies for Comments is a WordPress plugin designed to help reduce spam in comments. It works by adding a stylesheet or image to your site's HTML source, which sets a cookie in the user's browser. When a user submits a comment, the plugin checks for the presence of this cookie; if it is absent, the comment is flagged as spam.

Additionally, the plugin can monitor the time taken for a user to fill out the comment form. If the submission is too quick, it may indicate a spam bot. For advanced users, there are options to modify the .htaccess file to block spam attempts before they reach WordPress.

Best for: This plugin is suitable for WordPress site owners looking to minimise comment spam.

What it does well

  • Helps reduce comment spam
  • Checks for cookies to validate users
  • Monitors comment submission speed
  • Free to use from the WordPress.org directory
  • Compatible with WordPress MU

Where it falls short

  • Limited feature information provided
  • Last updated in June 2019

Verdict

Cookies for Comments offers a straightforward approach to combat spam in comments, but its last update was in 2019, which may be a concern for some users.

From the developer

Donncha O Caoimh (a11n)'s own description of Cookies for Comments, lightly tidied.

This plugin adds a stylesheet or image to your blog’s html source code. When a browser loads that stylesheet or image a cookie is dropped. If that user then leaves a comment the cookie is checked. If it doesn’t exist the comment is marked as spam.
The plugin can also check how long it took a user to enter a comment. If it’s too fast it’s probably a spam bot. How fast can a legitimate user enter their name, email, web address and enter a well thought out comment?

For the adventurous, add these lines to your .htaccess and it will block spam attempts before they ever get to WordPress. Replace the Xs with the cookie that was set in your browser after viewing your blog. You can also find the cookie value by examining the page source code and looking for “css.php?k=XXXXXXXXXXXXXXXXXXX”. Make sure the lines go above the standard WordPress rules.

    RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
    RewriteRule ^wp-comments-post.php - [F,L]

If you use WordPress MU, replace wp-comments-post.php above with wp-signup.php to block spam signups.

    RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
    RewriteRule ^wp-signup.php - [F,L]

Read the full description on the official page →

Tagged as