Skip to content


Did you pass math? WordPress Comment anti-spam plugin.

I just whipped this up:

http://www.herod.net/dypm/

I’ve been struck by comment spam in the last few days with several spam comments awaiting moderation before I turned on akismet to block them.

This morning however, after 54 blocked comments, one got through akismet and I decided to try my hand at a WP plugin.

It turned out to be surprisingly easy, perhaps only 20 minutes work, including the learning of how wp plugins work for comments.

Credits to jroller for the inspiration. I guess we’ll find out if a spammer is interested in beating it – I’ve several ideas for improvements, but I’d rather keep them in reserve for when it gets beaten (which could be an hour from now, or a year :) )

Posted in Internet, Odd Stuff, Tech, life.

4 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. And this is a test comment to make sure I didn’t muck up the latest release :)

  2. Is this plugin compatible to wp ver. 2.02? thx!! After installed nothing has changed!

  3. Hi Steven,

    FYI, the plugin works great with WP 2.1. Also, I added another global option to query even logged in users. (I’ve had trouble with people registering junk users and then spamming.) Here are the relevant details:

    var $_query_logged_in_user_too = true; // If you want to force logged in
    users to answer the math question as well

    // If the user is logged in, dont prompt for code
    if (!$_query_logged_in_user_too && isset($user_ID)) {

    // If the user is not logged in check the security code
    if ($_query_logged_in_user_too || !$user_ID && ($comment_type === ”))
    {

    Email me at david@coppit.org and I’ll email you the .php file if that’s easier.

    Regards,
    David

  4. Oops.

    $_query_logged_in_user_too

    should have been

    $this->_query_logged_in_user_too

    everywhere.

Some HTML is OK

(never shared)

or, reply to this post via trackback.