Slow down trackback spam with Simple Trackback Validation

I used the Simple Trackback Validation plugin for a while until I noticed these errors showing up in php_errors.

PHP Fatal error: Cannot instantiate non-existent class: snoopy in /home/www/wp-content/plugins/simple-trackback-validation/simple-trackback-validation.php on line 158

This morning I decided to fix it as the spammers have been going crazy. I spotted dozens of POST requests to trackbacks as I tailed my log files.

How to fix the plugin:

  1. Open simple-trackback-validation.php in a text editor and go to line 158. It should be this line:
    $stbvSnoopy = new Snoopy;

  2. Above that line, add the folloing line:
    include_once( ABSPATH . 'wp-includes/class-snoopy.php' );

  3. Save the file and upload to your host again.

It’s no substitute for Akismet but along with Cookies for comments it should help keep your blog spam free!

Or, as I’ve just done because this blog is being inundated with trackback spam right now (over 17,000 in the last 9 hours), I blocked off access completely with this rewrite rule. Any WordPress blog will send a pingback anyway and MT even supports pingback now!

RewriteRule ^(.*)/trackback/ - [F]

Published by


Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Google+ and Twitter.

17 thoughts on “Slow down trackback spam with Simple Trackback Validation”

  1. Pingback: Spam at alex.rabe

  2. Note that if you copy and paste the additional line directly from the above blog URL, you’ll get high-ASCII curly quotes that will result in this error message:

    Parse error: syntax error, unexpected T_CLASS in /home/gagne2/public_html/showbits/wp-content/plugins/simple-trackback-validation.php on line 158

  3. Donncha,

    I’ve actually had this problem with the Simple Trackback Validation plugin since I upgraded to WordPress 2.3 and finally got fed up and quit using it when the plugin’s author stated he hadn’t ever heard of it before. It doesn’t look like it’s even under development any longer.

    Thanks for fix though. It’s much appreciated.

  4. I noticed Snoopy is not included as part of the plugin package. I also do not have Snoopy in /wp-includes/. I didn’t see any indication in the instructions that I needed to do so, but do I need to download and install Snoopy as well?

  5. Arg, I fixed this myself in a not too dissimilar way as a hack after seeing these in my error log. I have been so busy lately (recovery from LASIK on eyes etc) to release or announce this but I had planned and I am glad you did. Kudos.

  6. Pingback: BloggingTom

  7. Thanks! Since I upgraded to WP2.7 I was suffering with this error in another plugin. It lacked the include line (but it worked till now, don’t now why). Now it works again.

    Lot of thanks!

Leave a Reply