A WordPress Plugin Rewrite Challenge

I've been a fan of Joe Tan's Simple Spam Filter (SSF) almost since the day it was created. Regardless of that fact, it has some shortcomings that need to be fixed and I don't think I'm the person to do it. I just shot a message over to Stephen Cronin of More Than Scratch the Surface to see if his plate is full or not. He's the author of the DualFeeds plugin, which I use and the IFrameWidgets plugin, which I don't (because my theme doesn't have widget support).

Joe Tan conceived the SSF as a pre-filter for the Akismet plugin, which is bundled with WordPress. As a pre-filter, it stops comments from spambots that try to add comments containing common spam words like cialis, viagra and words I don't care to publish as open text. It scans the comment text, but not the comment headers. It uses Perl regular expressions to pluck the words from the text. Regular expressions are powerful when they're used in the way they're designed, but the average person can't make heads or tails of them. I believe the PHP functions of strstr or stristr (case sensitivity being the difference) would be better suited for finding words as well as complete phrases.

I don't have anything against Joe Tan, but he doesn't respond to comments well and I have yet to get a response to an email message I sent him. Of course, I can't be certain he received it. One item he didn't respond to in comments was the fact that some of the comment spam contains the same text in the comment author field as the first line of the comment text. It's pretty easy to spot but SSF doesn't check for it. Other comments that seem to pop up a lot are comments that end in "" (an ellipsis). It's a special HTML character (…) that no one in their right mind would type as comments, even if they could.

The plugin doesn't block comments; it merely requires you to confirm that you want to post that spammy word in your comments. It's a "sanity check" (in Joe's own words) to prevent the most common spam from getting through. It'll greatly reduce the amount of comments that appear in the Akismet filter results, saving a whole lot of time. I'm asking for someone to rewrite it to make it even better. Most of the spam showing up on my Akismet filter pages are those that I've mentioned, since the others have already been whacked by the plugin as it is. I would rewrite it myself, but I don't have the patience to test it and knowing myself, I would do something catastrophic and end up wiping out my blog or something.

Stephen isn't the only one who writes good plugins; he's just the first person that came to mind. I don't think his feelings would be hurt by anyone else stepping up to the plate and taking a swing at it. Are you up to the challenge?


Similar Posts:

22 Comments

  1. Ray says:

    I use Dr Dave's Spam Karma 2 (with Akismet left deactivated, just in case I need it). After a short training session it works in the background and doesn't bother me. I get the occasional human spammer, but all the bots are cleared away.

    • RT Cunningham says:

      Some people swear by SK2. I tried it and I didn't like it. With SSF, they don't get to post unless they click an additional button (but only if flagged as a spammy word). Very little makes it to Akismet compared to not using it. It's still too much, but there's no false positives ever causing a comment to get deleted.

  2. RT, as per our correspondence via email, I'm happy to look into this (and I think I've already resolved the author matching the start of the comment). However, I do have a lot on at the moment, so I don't mind if someone else wants to take over. Thanks for thinking of me!

  3. hari says:

    If I were still using WordPress, I might have looked into this, but WordPress no longer interests me personally so I have little motivation in fiddling with it… :shock:

  4. The revised version is now complete. The new features are:

    1. Checks whether the author name appears at the start of the comment text, which is common with spam comments.

    2. Checks for the use of an ellipsis, which is unlikely to be typed.

    3. Strips dashes (and other characters) from the comments before comparing words (to catch vi-agra).

    If anyone wants a copy, let me know (via the contact page on my site). I'm planning to make this available on my site in the next few days, but I've emailed Joe Tan and if he wants to add my changes to the original in short order, I won't bother. I don't really want to split the code.

    • RT Cunningham says:

      Thanks for jumping on this. Don't look for anything in the neighborhood of an immediate response from Joe Tan.

      • Actually, Joe got back to me pretty quickly, saying he'll include the changes in the next release. He's created an entry in the google project for the plugin, to keep track of these changes. So it's looking good.

  5. [...] RT from Untwisted Vortex threw down a WordPress Plugin Rewrite Challenge, asking whether I'd rewrite the Simple Spam Filter plugin from Joe Tan. RT is a fan of Simple [...]

  6. Okay, for anyone who's interested, I've put the hacked version of the plugin up on my website. Joe has indicated he'll add the changes into the real thing, so this will only be on my site until he releases the next version. Thanks for the challenge (and the help) RT.

  7. [...] too, but these are the ones I think will best translate into online income. When I answered a WordPress Plugin Rewrite Challenge, I realised there's a market for custom WordPress plugins and plugin modification that I can [...]

  8. EzyAs123.com says:

    Did you know that our Wordpress Blogs can be hacked?

    This only came to my attention when I found a funny post in my blog which I knew I didn’t write. Call it a warning which prompted me to take action.

    I went about finding the cheapest, easiest and most secure method to keep the nasty people out of my blog, and I’m happy to say I found it. Best of all it only costs $10, which you would have to agree, is a small price to pay for a secure Wordpress Blog.

    Have a look at my post for more information.

    http://ezyas123.com/wordpress/wordpress-blogs-can-be-hacked-so-make-sure-you-are-protected/

    I hope this message gets posted because I really think this will help a lot of people.

    I am pledging 10% of all profits from this plugin to this organisation http://PeopleAid.org in an effort to help with their security in life.

    Have an awesome day

    Ian

    EzyAs123.com's last blog post..A Niche is a Notch. Catch?

  9. Antoni says:

    Simple Spam Filter very goodplugin for wordpress…i use it in all my blogs.

  10. Manish says:

    I didnt knew any of these guyrs.thank you for disclosing all these plugins for spam.till now i removed them by hand and that was like hell.