Wordpress Plugins » Conditional CAPTCHA for Wordpress

Akismet is great at detecting spam, but if you get lots of it then it means trawling through the spam queue in case there are any false positives.

I’ve written a plugin that provides a user-friendly CAPTCHA complement to Akismet:

  • If Akismet identifies a comment as spam, it will ask the commenter to complete a simple CAPTCHA.
  • If they fail, then the comment will be automatically discarded or trashed (and won’t clutter up your spam queue).
  • If they pass, it will be allowed into the spam queue. That way the spam queue will contain only the most likely false positives, making it much easier to identify them.
  • Meanwhile, genuine commenters (i.e., those not flagged by Akismet) will be able to comment on your blog hassle-free, and without CAPTCHAs.

The plugin lets you choose between the default CAPTCHA (a simple text-based test) and reCAPTCHA (this requires getting a free API key). You can style the CAPTCHA page to fit with your theme using CSS.

This plugin requires Akismet to be active in order to work, and requires PHP version 5 or greater.

You can download the latest version of the plugin here. If you have any problems or comments, please post a note below.

16 Comments:

  1. Sounds brilliant.
    Is there anywhere where I can see the plugin in action? Or perhaps a few screenshots?

    I’m sure your captcha looks good, but some can be very difficult to read!

  2. @Kieth:

    Sure, I’ve uploaded a couple of screenshots here. As you can see it’s not an image-based captcha, rather one of those “can you make sense of this?” concepts. I wanted to keep it as accessible as possible.

    However I am thinking of including have included the option to use reCAPTCHA as an alternative in the next version version 1.1. That requires the user to get (yet another) an API key though.

  3. can i use conditional captcha with tdo-mini-form ?

  4. @Limanov:

    Sorry, you can’t. Conditional CAPTCHA relies on the internal Wordpress form handling procedures. But tdo-mini-form doesn’t use these and does its own form handling.

  5. hi.
    i’m getting an error like ‘Akismet does not appear to be active. This plugin requires Akismet to be active in order to work. Please activate Akismet before changing the settings below.’ even though akismet is running quite happily and has been blocking spam correctly.
    i’ve entered my recaptcha keys. using wp 2.8.5 and the latest version of conditional captcha.
    any ideas?
    cheers.

  6. @lupinehorror:

    I’m not really sure what’s causing that. However I have made some changes to the way Akismet is detected to try and eliminate some potential issues that might be causing your problem. Please try upgrading to version 1.5 and let me know if it works properly.

  7. Mohammed

    I’m having the following error:
    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/…/wp-content/plugins/wp-conditional-captcha/wp-conditional-captcha.php on line 27

  8. @Mohammed

    Could you tell me what version of PHP you are running? I’m afraid the plugin will not work with PHP 4 – I didn’t realise this earlier.

  9. Is there a way to see the comments that this plug in captured? I’m worried that it’s grabbing legit comments that are passed through via BackType. Thanks.

  10. @Jonathan:

    At present there isn’t, although I might add a logging feature into a future version. Storing the complete comments would essentially leave you in the same position that Akismet does on it’s own though.

    You needn’t worry about BackType – Conditional CAPTCHA will never intercept comments posted through it. This is because BackType doesn’t use Akismet’s native methods to query the Akismet database, but has it’s own internal method instead, which other plugins cannot hook into.

  11. a great plugin, spam comments have been stopped in 99% of the cases.

    thnx a lot

  12. Hi! Thanks for the useful plugin. I took the code and wrapped the strings in it with localization functions so that I could translate them for my Finnish blog. I’m linking it here in hopes that a future, official release of the plugin by you will support localization too. :)

  13. @Jani

    Done! Version 1.9 supports localisation. Thanks for your help.

  14. Wow, that was quick! Excellent, thanks! :)

  15. Hi!

    This is a brilliant plugin – thanks very much for making it.

    The really clever part is how you have thought of the process flow – creating something that works alongside Akismet is genius, and a much better solution that making everyone go through CAPTCHA.

    My favourite plugin by far – has discarded dozens of spams that I would have had to manually check within hours of me installing it.

    Thanks,

    Marcus.

  16. nice plugin…but how to intall it..I’m a newbie I cannot found the way to install this plugin in my blog…

Leave a Reply