Ben Ward

Anti‑Link–Spam plug‑in for Wordpress

. Updated: .

I get a lot of comment spam. Trackbacks are now disabled out of frustration, and most of the spam from the website itself gets eaten by Akismet. Not all, though. Wordpress allows comments containing a certain number of links to automatically be redirected into the moderation queue, which is useful at stopping spam going public but over this weekend resulted in dozens of spam messages containing dozens of links needing to be deleted manually.

Anti‑Link–Spam for Wordpress is a very crude plug‑in that blocks all comments containing 5 or more URLs. In fact, it’s cruder than that; it will block all comments containing 5 or more instances of the string ‘http://’ — so it’ll block mis‑directed BBCode ‘[url=]’ spam as well. I’ve not added any comment type filters either, so it should also parse trackbacks and pingbacks if you like to leave them enabled.

It’s not pretty, there’s no configuration screen (you can change the hyperlink count by setting a variable in the code, and edit the HTML of the error message as well), but I’m confident it’ll reduce my comment moderation burden.

Download Anti‑Link–Spam 1.0 for Wordpress.

I’ve also put up an Anti‑Link–Spam page, where you can always find the latest version.

Comments

Previously, I hosted responses and commentary from readers directly on this site, but have decided not to any more. All previous comments and pingbacks are included here, but to post further responses, please refer me to a post on your own blog or other network. See instructions and recommendations of ways to do this.

  1. Ben

    I have Akismet as well. At time of writing it’s caught 92,000 spam comments. The reason for writing this plug-in is to reduce the load on Akismet, perhaps making it possible to review its spam queue, rather than having to just junk everything.

    Also, a larger number of comments were getting through Akismet over the weekend that fitted into the ‘20 links spammed together’ category.

  2. i get no comment spam anymore, but i did have to delete my catch all pop3 account that came with my website package, its was rendered useless because of the amount of spam it got

You can file issues or provide corrections: View Source on Github. Contributor credits.