The best anti-spam plugin for Wordpress!

October 5th, 2008

xkcd strip illustrating the concept of doing something wrong.

Most anti-spam scripts today are based on IP blacklists, word blacklists or a combination of the two. When this blog was still young, I had a spam problem, like most people. First I made my own spam filter based on a series of common spam words like, viagra, cialis and so on. it worked badly, and soon I started to get more spam using non-blacklisted words. So I tried to think about a more general way of distinguishing a spambot from a human.

The answer was pretty simple. A real human will probably use a real web browser with Javascript enabled. So I wrote a small piece of obfuscated Javascript which a spambot will have absolutely no chance of emulating. The result was a completely spam free blog!
The other day I actually found Wordpress plugin based on the same idea. That plugin is called Hashcash and looks promising. My own script is very crude. It’s not a proper WP plugin, it doesn’t log any acitivity, and it just removes the spam rather than saving it for analysis at a later point. Hashcash has all these features though. The disadvantages with this kind of spam protection is
1) that the user needs to have Javascript enabled and working
2) that it won’t filter manual spam. (Ie people in poor countries hired to post spam) But I have a treat for them!
But if you want the best possible spam protection, choose Hashcash!

For this blog I’ll stick with my own script, since it does its job. However, the next time I start a blog, I’ll go for Hascash. This will actually happen pretty soon, since I’m planning to revive Packets of Knowledge, a blog where I post random computer related tips and tricks for noobs and experts alike.

Leave a Reply

If you'd rather contact me directly, please use the following e-mail address: It appears that you have Javascript disabled. Please enable it to see my e-mail address.