The Best Anti-Spam Comment Plugin for Wordpress – Auto Close Posts

Posted on: April 7th, 2008 by Jeremy Schoemaker

Akismet, which luckily comes bundled with Wordpress (and also owned by Wordpress’s parent company Automatic) is one of the best anti-spam plugins for Wordpress. But I still get a bunch of spam and it doesn’t take a rocket scientist to see where its comping from. Basically people hammer the crap out of search engines looking for blogs and keywords using a dictionary file most likely. Once spammers find 1 post they then will start hammering your blog from various proxies (most of which are akismet blacklisted) starting from your first post (http://www.shoemoney.com/?p=1, http://www.shoemoney.com/?p=2, http://www.shoemoney.com/?p=3, etc, etc.) and just climbing the way up until they get a 404 (or probably multiple 404’s cause some posts will be missing. Course they all do these with random emails/proxies/names and while they are easy to identify they take up time.

After even further analysis of my comment spam that passes the Akismet test the number is actually about 95% are from posts that are 2 weeks or older. So there we go. Now I just need to write a plugin that will automatically not allow comments or trackbacks on posts that are 2 weeks or older. So I start searching online and… looks like some kid named Matt Mullenweg had the same idea years ago with wordpress 1.x

You can get the plugin here.

Its a very simple plugin that checks the age of the post before loading and if its older then the days specified (default is 14) then it closes comments and pingbacks. WINNAR

Post written by Jeremy Schoemaker

Hi I am Jeremy Schoemaker and ShoeMoney.com is my blog. 99% of the post here are done by me but you will see others occasionally make guest posts. This blog is fun to write but for my day job I run several online companies.

More about Jeremy at http://www.shoemoney.com!

Have You Read:

74 Comments. What Say You?

  1. Alejandro Reyes
    April 7, 2008 at 11:58 am

    yo shoe ! it’ll definitely help in the long run for me as i barely started my blog but it’s definitely a hot plugin!

    do you keep yours to the default 14 days?

    just curious.

    thanks holmes!

  2. Josh
    April 7, 2008 at 11:59 am

    The Matt Mullenweg you mention is the founder of Wordpress and Automattic, in case you didn’t know.

  3. Mark
    April 7, 2008 at 12:04 pm

    Aside from the spam benefit… this plugin sounds like it will be great for those older posts that still get questions after 6 months. Not that I mind the questions, but when a timeline passes (Like a contest) and you still get people asking to be included… well..

    Mark

  4. DougS
    April 7, 2008 at 12:05 pm

    Askimet is the definite tool of choice, we install by default on all blogs

    Doug

  5. Search Engine Optimization Journal
    April 7, 2008 at 12:19 pm

    Ah, this is great! We can’t stand the spam that gets past that damn Akismet filter. Thanks!

  6. Meethere
    April 7, 2008 at 12:34 pm

    But what if we want comments to continue ?
    Is there any custom option for that ?

    Looks nice. :)

  7. Brian Mark
    April 7, 2008 at 12:43 pm

    I’ve been thinking about doing that manually, but this makes things pretty simple. Of course, I don’t post nearly as often as you do, so it’s got to be awesome on a whole new level for you.

  8. Sebbi
    April 7, 2008 at 12:54 pm

    I recommend http://jamesmckay.net/code/comment-timeout/ … it is more flexible than Matts simple solution and you can override it for individual posts.

  9. Affiliate Confession
    April 7, 2008 at 1:03 pm

    So how much comment spam do you get that gets through Akismet?

  10. Nate
    April 7, 2008 at 1:07 pm

    I’ve been wondering about this myself but don’t get enough to really worry about.

    Thanks!

  11. Michael D
    April 7, 2008 at 1:27 pm

    Seems like a good option although some posts I may leave open for further commenting. For me, it’s not the traditional spammers that are clogging things up (akismet working well there) but the d’bags that post keyworded urls on posts. I’ve gotta look into some kind of filter for that.

  12. Nick
    April 7, 2008 at 1:30 pm

    “some kid named Matt Mullenweg” lol

  13. Tim
    April 7, 2008 at 2:03 pm

    I’ve been using Spam Karma 2 and it works great. It uses Akismet and post age and other factors to detirmine if it’s spam. So if you want to keep the older posts open, but still have the filter take the fact that it’s old into account, SK2 might be for you.

  14. Website Reviews
    April 7, 2008 at 2:18 pm

    I am not sure I would want my older posts to be closed, but it is an interesting concept.

  15. Paul
    April 7, 2008 at 2:55 pm

    absolutely hate spam. We get them all the time but I know that you are getting hit so much more than I do, so I can only imagine how that frustrating that could be.

    Interested to see how well it works.

  16. Walt
    April 7, 2008 at 3:10 pm

    “some kid named Matt Mullenweg”

    Some kid…you’re not serious, are you? Matt Mullenweg is the developer of WordPress.

  17. Jonathan Volk
    April 7, 2008 at 3:16 pm

    Nice! :D

  18. Feed Flare
    April 7, 2008 at 3:25 pm

    Thanks for link Jeremy. I went almost a month with no spam when I was new and now…holy cow!

  19. Douglas Karr
    April 7, 2008 at 3:28 pm

    Why would you not want to keep old threads alive through user-generated content? Isn’t there some benefit to that (wish you had subscribe to comments!)

  20. NOname
    April 7, 2008 at 3:38 pm

    Actually I had a problem with spam comments. What I did was javascript encypte the comment form in the wordpress comment.php template. Have not had 1 spam in like 3 weeks. Because bots don’t parse javscript so the can’t see the form, Hence they have nothing to fill out and hit POST with this.
    If your interested more in this check out.
    Javscript Encode decode

  21. jtGraphic
    April 7, 2008 at 3:41 pm

    This also helps keep comments on dead topics to a minimum… Good call.

  22. Greg
    April 7, 2008 at 3:42 pm

    I agree with Doug’s point. It’s nice when a post from months ago can flair up with a few recent comments. Especially since, give all the SEO traffic, that old post could well be someone’s first introduction to your site.

    Maybe there could be a higher bar for submitting comments to an old post, like registering or CAPTCHA (though I hate CAPTCHA).

  23. Sean
    April 7, 2008 at 4:18 pm

    good analysis on covering the 95% of your comment spam penetrating your filter. You must have been an Admin at some point ;)

  24. Jim
    April 7, 2008 at 4:20 pm

    I actually posted about this some time ago and someone suggested comment timeout… It has virtually eliminated all of the automated comment spammers on my blog.

  25. Sean
    April 7, 2008 at 4:21 pm

    interesting thought. my guess is that since 95% is spam people aren’t commenting on the old stuff enough to matter and search engine converage of the post is probably saturated as well.

  26. Sucker
    April 7, 2008 at 4:42 pm

    That’s a pretty good one, but WP-SpamFree is even better.

  27. Chris Jacobson
    April 7, 2008 at 5:47 pm

    Great plugin Shoe! I’m getting a lot of spam on posts 6 months old and more. This will solve that little problem. :)

  28. Tamar Weinberg
    April 7, 2008 at 5:47 pm

    I hear you on that. I sometimes get some comments on posts that are *really* old and that are still pretty valuable. When I see one of my older (and not so good) posts getting a slew of new comments, I manually disable comments, but otherwise I keep it as-is.

  29. Tamar Weinberg
    April 7, 2008 at 5:48 pm

    I think he was kidding, Walt. ;)

  30. Tamar Weinberg
    April 7, 2008 at 5:49 pm
  31. Yash
    April 7, 2008 at 6:08 pm

    We got the same thing in movable type by Mark. I think its on mt-hacks.com or something. I wonder who thought of it first?

  32. Hustle Strategy
    April 7, 2008 at 6:18 pm

    Are you going to take down the favorite post and most commented posts? seems they will be left out…

  33. Aaron Nimocks
    April 7, 2008 at 6:20 pm

    I noticed this also awhile back but never really had the energy to go find a solution. Thanks for helping us lazy people! :)

  34. Hustle Strategy
    April 7, 2008 at 6:25 pm

    more traffic, more problems, i guess

  35. Hustle Strategy
    April 7, 2008 at 6:26 pm

    I wonder how long this post was sitting idle in the shoemoney stock pile. the plugin hasn’t been modified in over a year.

  36. Affiliate Confession
    April 7, 2008 at 6:38 pm

    Never thought about getting spam on posts older than 2 weeks, but I guess that’s what spammers do.

  37. Justin Chelf
    April 7, 2008 at 6:48 pm

    Ya, I use this on some of my blogs. The combination of things works to success.

  38. Travis
    April 7, 2008 at 8:41 pm

    I find that Akismet weeds out 99% of the comment spam. However, I’ve used this plugin as a backup on some other sites. I usually extend it to 30 days.

  39. sikantis
    April 7, 2008 at 9:47 pm

    Great post! I don’t get yet a lot of spam, hope this will stay like this.

  40. Terry Tay
    April 7, 2008 at 9:51 pm

    He knew who he is, but was being funny by saying “some kid matt mullenweg”…I guess he just assumed most people would get it.
    ~Terry

  41. Mark
    April 7, 2008 at 9:51 pm

    Lol, I’m pretty sure he knows ;-) After all, he’s had Matt on his radio talk show.

  42. Terra Andersen
    April 7, 2008 at 9:53 pm

    Wonderful! Akismet doesn’t catch nearly as much spam on my blog as I’d like. I end up editing many comments everyday.

  43. Terry Tay
    April 7, 2008 at 9:56 pm

    What if you have posts that you still want people to comment on that are old? Perhaps there needs to be some other plug-ins that will help.
    ~Terry

  44. Ken Savage
    April 7, 2008 at 10:39 pm

    OoooO RLY

  45. Yudhi Arie Baskoro
    April 7, 2008 at 11:17 pm

    i think i might use this one too …

  46. Funky South
    April 8, 2008 at 3:08 am

    interesting, I will take a look, thanks for sharing !

  47. Keylogger Hater
    April 8, 2008 at 5:30 am

    I’ve already seen something like this on the other blogs, so you apparently won’t be first.
    Hope this one help, damn spammers regularly annoy me on my content sites.

  48. SEO web hosting
    April 8, 2008 at 7:45 am

    Thanks for the tip. I did not have this plug in installed, yet.

  49. Lynx
    April 8, 2008 at 7:54 am

    Captain Obvious is in the building!

  50. Lynx
    April 8, 2008 at 7:56 am

    no he’s not serious…

  51. Flimjo
    April 8, 2008 at 9:24 am

    I’ve seen this plugin before, and I’ve seen other blogs with closed comments. It’s pretty effective.

  52. Flimjo
    April 8, 2008 at 9:29 am

    Me too. I get a bunch of spam comments, but Akismet only catches about 95% of them.

  53. Flimjo
    April 8, 2008 at 9:31 am

    My only problem with this plugin is that you have to close older posts. I, on the other hand, like to see readers’ comments, and I want to keep that avenue open for them on older posts.

  54. Loadedarticles blog
    April 8, 2008 at 10:24 am

    Thanx for the tips mate
    i have not really used any anti spam before

  55. markus941@gmail.com
    April 8, 2008 at 12:10 pm

    I think it might be even better if it switched just those posts to “you need to login to post a comment” in case someone wants to add something valuable (it’s just an extra hoop for them to jump through so you wont get spammed plus you might get another subscriber/member)

  56. Mayank Rocks
    April 8, 2008 at 9:59 pm

    I have noticed that the similar spams are coming over and over again. Akhismet does block it, but sometimes it blocks pingbacks etc also which you want to approve. And sometimes some natural comments get blocked too. I am trying to block directly frmo “comments tab” in wp-admin. It really helps!
    I will check the plugin now. Thanks

  57. Nicholas James
    April 9, 2008 at 8:11 am

    Shoe knows…he’s blogged about him before.

  58. Nicholas James
    April 9, 2008 at 8:12 am

    Most people do…and if they don’t they are insane lol its one of the most useful plugins for wordpress.

  59. Nicholas James
    April 9, 2008 at 8:12 am

    It kills the spammers…it has great benefit :)

  60. Nicholas James
    April 9, 2008 at 8:13 am

    Loved the “some kid” part :) …but its a great plugin :)

  61. shanker bakshi
    April 9, 2008 at 12:30 pm

    Yes I wonder when akismat is in action why sometimes i hit by some span comments -okay alright i may try this out.

  62. JustAnIdea
    April 9, 2008 at 9:42 pm

    Why not fine tune it and block only those posts older than 14days that contain URL links? Just free text with no link could be let through no matter how old the post.

  63. Julian
    April 10, 2008 at 4:39 am

    Nice! Thank you a lot. I moderate every comment on my blog, but sometimes there are really good comments to post which are very old. These are just one out of ten, but still visitors should have at least the posibility to comment. Does it count for trackbacks, too?

  64. Not John
    April 13, 2008 at 4:02 pm

    That’s great. I am going to download now.

  65. Nate Hill
    April 13, 2008 at 9:36 pm

    That looks like a really useful plugin should save webmasters a lot of time deleting and approving blog comments etc…

  66. Gorilla Gripper
    April 15, 2008 at 10:21 am

    Thanks for the tip. I have a friend who complains constantly about the spam on his blog.

  67. Ajay
    December 20, 2008 at 12:54 pm

    My plugin Auto-Close adds several more features including the ability to close comments and pingbacks separately as well as include certain posts/pages from having their discussions closed.

    The latest version also allows the user to delete post revisions. Do give it a shot and let me know.

  68. nubaccili
    February 10, 2009 at 9:37 pm

    exciting and informative, but would be suffering with something more on this topic?

Leave a Reply