Plugin Directory

Test out the new Plugin Directory and let us know what you think.

AVH First Defense Against Spam

The AVH First Defense Against Spam plugin gives you the ability to block spammers before any content is served.

The AVH First Defense Against Spam plugin gives you the ability to block spammers before any content is served by identifying them at the Project Honey Pot, a local blacklist or the local IP cache. Visitors trying to post a comment are checked at stopforumspam.com. Stop Forum Spam is not used to check before content is served due to the amount of requests, which overloads their infrastructure.


  • PHP 5 is required.
  • The visitor's IP can be checked at the following third parties:
  • Spammers can be blocked based on the information supplied by the third party or by using a local blacklist.
  • Comments made without a HTTP referrer can be blocked.
  • Separate thresholds can be set for the following features:
    • Send an email to the board administrator with information supplied by the third party about the spammer.
    • Block the spammer before content is served.
  • Bypass the checks for the IP at the third parties and the local blacklist, based on IP in the local whitelist.
  • Ability to add single IP's and/or IP ranges to the blacklist and whitelist.
  • When an IP is blocked a message can be displayed to the visitor with the reason why access was blocked.
  • Report a spammer to Stop Forum Spam. A valid API key from Stop Forum Spam is necessary.
  • Add a spammer to the local blacklist by clicking a link in the received email.
  • IP Caching system.
  • Use a honey pot from Project Honey Pot.
  • Option to block spammers that access wp-comments-post.php directly by using a comment security check. An email can be send when the check fails.

Blocking a potential spammer before content is served has the following advantages:

  1. It saves bandwidth.
  2. It saves CPU cycles. The spammer is actually checked and blocked before WordPress starts building the page.
  3. If you keep track of how many visitors your site has, either by using Google's Analytics, WP-Stats or any other one, it will give you a cleaner statistic of visits your site receives.

Usage terms of the 3rd Parties

Please read the usage terms of the 3rd party you are activating. * Stop Forum Spam. * Project Honey Pot. * Spamhaus.

The IP Caching system.

Stop Forum spam has set a limit on the amount of API calls you can make a day, currently it is set at 20,000 calls a day. This means that if you don't use the Blacklist and/or Whitelist you are limited to 20,000 visits/day on your site. To overcome this possible problem I wrote an IP caching system. If you use the caching system you still have a limit with Stop Forum Spam , but the limit is set to 20,000 unique visits/day.

The following IP's are cached locally:

  1. Every IP identified by a 3rd party as spam and triggering the terminate-the-connection threshold.
  2. Every clean IP.

Only returning IP's that were previously identified as spammer and who's connection was terminated will update their last seen date in the caching system. Every day, once a day, a routine runs to remove the IP's who's last seen date is X amount of days older than the date the routine runs. You can set the days in the administration section of the plugin. You can check the statistics to see how many IP's are in the database. If you have a busy site, with a lot of unique visitors, you might have to play with the "Days to keep in cache" setting to keep the size under control.

Checking Order and Actions

The plugin checks the visiting IP in the following order, only if that feature is enabled of course.

  1. Whitelist - If found in the list skip the rest of the checks.
  2. Blacklist - If found in the list terminate the connection.
  3. IP Caching - If found in the list and it's spam terminate connection otherwise if it's clean skip the rest of the checks except when posting a comment then a Stop Forum Spam check will be done.
  4. Stop Forum Spam - Only when the visiting IP is posting a comment. If found and it's spam terminate connection.
  5. Project Honey Pot - If found and it's spam terminate connection, if found and it's set to be a search engine no further checks will be performed.
  6. Spamhaus- If found and it's spam terminate connection.

To my knowledge this plugin is fully compatible with other anti-spam plugins, I have tested it with WP-Spamfree and Akismet.

Requires: 4.5 or higher
Compatible up to: 4.5.6
Last Updated: 7 months ago
Active Installs: 10,000+


2.5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,1,1 100,1,1
0,1,0 100,1,1
100,2,2 100,2,2
100,2,2 100,1,1 100,2,2
100,1,1 100,1,1
0,1,0 50,2,1 50,2,1 50,2,1
100,2,2 100,1,1 100,1,1 100,1,1
100,1,1 100,3,3
100,1,1 100,1,1 100,1,1
50,2,1 100,1,1