Simple Spam Filter for WordPress
65 Comments
Current Version: 0.6
Plugin Downloads:
download mirror | past versions
Get notified of when updates are made to this plugin.
Other Related Links:
Project Page,
Support Group
On this little slice of the web, this blog might get thousands of comments each week, 99.9% of which are spam comments… a bit ridiculous if you ask me. The Akismet anti-spam plugin does a great job blocking all these spam comments, and I’m grateful for that. But because of the shear volume of spam, it becomes nearly impossible to check for any real comments might’ve gotten incorrectly labeled as spam. I’m usually happy if I get 2 or 3 real comments in a week, so to me (and I think most bloggers out there), every comment is important. And really, what is a blog if no one comments?
One thing I noticed while looking at the current generation of comment spams is that they tend to be immediately identifiable with some sort of pattern (see first screenshot). So I wrote the Simple Spam Filter to do a couple simple tests and immediately block and reject obvious spam comments.
If a comment gets rejected, then an error screen will be shown with an explanation of why the comment was rejected. An optional captcha (provided by reCAPTCHA) can also be configured to display, which allows people to confirm that their comment is indeed legitimate. The plugin also works in conjunction with Akismet and will display a captcha if Akismet flags a comment as spam (see second screenshot). In all cases, the captcha is displayed only if a comment doesn’t pass the obvious spam rules or if Akismet thinks a comment is spam. Comments that don’t pass the captcha are immediately rejected and discarded.
From my own testing, the following 5 patterns will catch at least 90%+ of all comment spam. This will probably evolve over time (check back for updates!), but for now it works pretty well. A comment will be rejected if it matches any of the following patterns:
- Contains 5 or more links to external sites
- Contains nothing but links
- Contains [url=http://www.example.com]example[/url] style links (my blog does not support bbcode style links)
- Contains a word that matches a short list of common spam words (for example, viagra or cialis). See the plugin’s source for the full list.
- The comment is very similar (over 75% similar) to a previously posted comment. This prevents spammers from copy and pasting a previously posted “real” comment and simply changing some links
As I mentioned above, this plugin isn’t meant to replace any of the existing spam plugins out there, but rather to work in conjunction with them. It does a simple “prefilter” to weed out the most obvious comment spams and then gives people who’s comments get flagged as spam an opportunity to confirm with a captcha that their comments are indeed legitimate.
I realize that this plugin is not fool proof by any means, since spam will continue to evolve over time; but now at least you don’t have to deal with comments that are obviously spam and hopefully spend a little less time looking for real comments incorrectly labeled as spam.
Author: Joe Tan (joetan54@gmail.com)
License: GPL
Features:
- A simple pre-filter to weed out the most obvious comment spam (about 90% of all spam).
- Legitimate comments that get blocked (either by this plugin or by Akismet) can be presented with a captcha to confirm that the comment is legitimate. Comments that don’t pass the captcha will be immediately discarded.
- Helps you identify potential spam words (you can use this to tweak the plugin’s filters).
Upgrade:
If you are upgrading from a previous version (0.5 and older), please install the upgrade version. The plugin’s file structure was reorganized to support WordPress’ new auto update feature.
Installation:
- Download and unzip the plugin.
- Upload the entire “tantan-spam-filter” directory to the WordPress
wp-content/pluginsdirectory. - Login to your WordPress admin, click “Plugins”, and then activate the “TanTanNoodles Simple Spam Filter” plugin.
- Configure your spam and reCAPTCHA settings by going into “Comments” -> “Spam Filter”
- You’re done!
Support:
If you are having problems setting up or customizing this plugin, please
visit the support group for help.
Someone may have already posted a solution to your problem!
More Documentation: Modification History, Known Issues and Bugs
Bug Reports:
If you find a bug or have a feature request for this plugin, please post them to this Google Project page.
Developers:
Browse this plugin's source code at the Subversion repository.
Want more WordPress goodness? Check out some of my other plugins and scripts >


65 comments
Nice one. Wouldn’t it be great if spammers saw their message get flagged as spam and left your site forever. Love your work.
This plugin looks very promising but the re-captcha function doesn’t work for me. Even though it is set up with my key, the filter just tells me the comment has been blocked (no option to enter captcha). I am using Wordpress 2.5. Any ideas?
Thanks,
Dalton
thank you very much.
Recaptche is the best IMHO
Hi everybody,
I have just download this plugin. But how can i activate this on my blog. Please guide me in this regards,
Thanks and regards,
Naseer Ahmad
@Naseer, just active the plugin and that should be it. Go into the settings screen for additional options (Comments -> Spam Filter).
great plug in and over 2,00 downloads! Thanks Joe. I’m always looking for ways to facilitate networking with like-minded individuals. I especially appreciate unique tools that help me harness the power of web 2.0 and social bookmarking sites so I can make good use of my time. There’s nothing worse than spending countless hours online to build your online presence, while losing valuable time that you could be spending with your friends and family. Luckily, I’ve found tons of useful tools to meet like-minded individuals and network super efficiently. In this age of user generated content driving up a website’s ranking, content is king and getting that content in front of the right people is the name of the game! Keep up the great blog.
—
Ana Hernandez, CEO Netrageouz.net
http://www.netrageouz.net/toolbox.htm
Thanks a lot. Great plugin!
Wow, I like this feature a whole lot more. Much better than leaving it up to only Askimet. Great job!
Hello !
I think it’s a very good plugin, however, like Dalton, it doesn’t work in my blog : the page which says that the comment is a spam displays but there is not re-Captcha… I work with WP 2.6 .
Thank you and excuse me for the mistakes (I’m French).
Flavien
Ah. A wonderful plugin to save us time and effort. Time is money, and this saves me TIME!
View all 65 comments
Leave a comment