WordPress Zero Spam

Written by
Typical Read
3 minutes

Quit forcing users to answer questions, read confusing captchas, or take additional steps to prove they’re not spam. Stop malicious bots & hackers in their tracks — introducing WordPress Zero Spam.

WordPress Zero Spam

WordPress Zero Spam Documentation

WordPress Zero Spam uses AI in combination with proven spam detection techniques and a database of known malicious IPs from around the world to detect and block unwanted visitors.

In addition, it integrates with other popular plugins to provide all-around protection. Just install, activate, and enjoy a spam-free site!

WordPress Zero Spam can be integrated into any form, plugin, or theme using its available hooks and helper functions. View the developer documentation below for more information.

This documentation is incomplete and a work in progress.

Available Filters


Filter for the plugin settings.

Example usage:
add_filter( 'wpzerospam_options', function( $options ) {
  // Modify/add to the $options array.

  return $options;


Filter for the whitelisted IP addresses.

add_filter( 'wpzerospam_whitelisted_ips', function( $ips ) {
  // Modify/add to the $ips array.

  return $ips;

WordPress_Zero_Spam class methods.

All methods in the WordPress_Zero_Spam class can be assessed via the $wordpress_zero_spam instance.


Returns the current page URL.

  • @return string The current page URL.
Example usage:
echo $wordpress_zero_spam->get_current_url();

get_ip_geolocation( $ip )

Retrieves an IP geolocation. Requires an ipstack api key, defined in the plugin settings.

  • @param string $ip The IP to get geolocation information for.
  • @return array The IP’s geolocation information.
Example usage:
print_r( $wordpress_zero_spam->get_ip_geolocation( '' ) );

get_ip_from_api( $ip, $api )

Checks an IP using a third-party API.

  • @param string $ip The IP to query.
  • @param string $api The API to query. stopforumspam or botscout.
  • @return array The API query result.
Example usage:
print_r( $wordpress_zero_spam->get_ip_from_api( '', 'stopforumspam' ) );

get_blacklisted_ip( $ip )

Checks if an IP has been blacklisted & returns the record if found.

  • @param string $ip The IP to check.
  • @return array|false The blacklisted API record or false if not found.
Example usage:
print_r( $wordpress_zero_spam->get_blacklisted_ip( '' ) );

get_blocked_ip( $ip )

Checks if an IP has been blocked & returns the record if found.

  • @param string $ip The IP to check.
  • @return array|false The blocked API record or false if not found.
Example usage:
print_r( $wordpress_zero_spam->get_blocked_ip( '' ) );


Returns the whitelisted IPs.

  • @return array Array of whitelisted IP addresses defined in the plugin settings.
Example usage:
print_r( $wordpress_zero_spam->get_whitelisted_ips() );


Returns the current user’s IP address. For more information, see Get IP Address.

@return string The current user’s IP address.

echo $wordpress_zero_spam->get_user_ip();


What & who is the information shared with when the “Share Spam/Malicious IP Detections” is enabled?

Detections are shared with the Zero Spam service. Information collected includes the detected spam/malicious IP, type of detection (comment, registration, etc.), site URL, email, WordPress version, name, tagline, language, and WordPress Zero Spam version where the detection was found.

6 comments on “WordPress Zero Spam”.

# Sep 22, 2020

Hi Ben,

I have raised a PR for Everest Forms to make it compatible. Please give a review regarding the PR raised:


# Sep 24, 2020

Thanks Shiva, I’ll take a look at it when I have a chance.

# Jul 15, 2020

Hi Ben,

Thank you for all of your great work with this plugin.

With the new version 4.0.0, does the plugin still provide anti-spam protection for contact forms like Contact Form 7 and others?

Thanks again.

# Jul 15, 2020

Hey Dominic, glad you found it useful. 4.0.0 currently only supports comments & registration, but within the next day or two will have support all the 3rd-party plugin like CF7 that it did.

# Jul 15, 2020

WordPress Zero Spam 4.1.0 was just released & now includes support for all the plugins it did previously.

# Nov 27, 2019

The downside of this new plugin is that anyone without support for JavaScript will have their comments rejected. However, the percentage of actual commenters with JS turned off is likely to be infinitesimal compared to the number of bots trying to comment on your site. If you don t mind the JavaScript requirement and want a simple solution with no options to configure, then WordPress Zero Spam is a plugin that may work well for you.

Join the conversation.

Your email address will not be published. Required fields are marked *

All comments posted on 'WordPress Zero Spam' are held for moderation and only published when on topic and not rude. Get a gold star if you actually read & follow these rules.

You may write comments in Markdown. This is the best way to post any code, inline like `<div>this</div>` or multiline blocks within triple backtick fences (```) with double new lines before and after.

Want to tell me something privately, like pointing out a typo or stuff like that? Contact Me.