WordPress Zero Spam

Quit forcing users to prove they’re humans by filling out confusing captchas & having to pick the right images. Make the bots and spammers prove they’re worthy of submissions with the WordPress Zero Spam plugin — just install, activate, and enjoy a spam-free site.
Published
Updated
Typical Read
2 minutes
Sponsored
Help support open-source projects & pro-bono non-profit services by donating today.
Find your next web developer job
jobs by Indeed

WordPress Zero Spam blocks spam submissions including comments, registrations, and more automatically without any config or setup. Just install, activate, and enjoy a spam-free site.

WordPress Zero Spam

WordPress Zero Spam Documentation

This documentation is still a work in progress.

Helper Functions

The following helper functions are available to use in any theme or plugin.

Be sure to check if the function exists, function_exists('function_name') before using any of the helper functions listed below. This avoids any potential PHP errors after removal of deprecated functions on updates. For more information, see the documentation.

wpzerospam_get_location($country_code, $region_code = false)

  • $country_code (string) The two-letter country code.
  • $region_code (string/false) The two-letter region code.
  • @returns (string) Human-readable name.

Returns the human-readable country or region name.

  • If no region is provided, it returns the country name.
  • If the country’s name isn’t available, it returns the country abbreviation.
  • If a region is provided, it returns the region name.
  • If the region name isn’t available, it returns the region abbreviation.

wpzerospam_get_ip_info($ip)

  • $ip (string) IP address.
  • @returns (array) An array with the IP address location information or false if not found.

Returns the geolocation information for a specified IP address.

wpzerospam_types($type_key = false)

  • $type_key (string) The key of the type that should be returned.
  • @returns (string/array) The human-readable type name or an array of all the available types.

Returns the human-readable spam type or an array of available spam types.

wpzerospam_key_check($submission_data = false)

This function should be used to integrate other forms with WordPress Zero Spam. The wpzerospam_key should be passed in $_POST or via the $submission_data parameter and will return true if passes or false if spam.

  • $submission_data (array) An array of submission data that contains the wpzerospam_key field.
  • @returns (boolean) true if the submission key matches the one in the database, false if it doesn’t.

Checks if either the submission data or $_POST contain the wpzerospam_key and if it matches whats in the database.

wpzerospam_set_list_table_request_uri($query_args)

  • $query_args (array) An array of the current query arguments for a table.

Sets the $_SERVER['REQUEST_URI'] for pages that extend WP_List_Table.

This is a fix for passing filters to WP_List_Table paging.

Did you find WordPress Zero Spam useful? Get articles in your inbox.

…and don’t worry, I hate spam as much as you. Expect to hear from me at most once a week.

Latest Job Postings
Posted on Aug 9, 2020 at 9:17pm
Full-time
Los Angeles
Posted on Aug 9, 2020 at 9:15pm
Full-time
Los Angeles
Posted on Aug 9, 2020 at 1:19am
Littleton, CO
jobs by Indeed
Sponsored
Need help with website, a boost in ranking or online marketing? Contact me today for a free quote.
Sponsored
Sponsor my site by donating to help support open-source projects, like WordPress Zero Spam, Referrer Analytics & others.
Sponsored
Sponsor my site by donating to help support open-source projects, like WordPress Zero Spam, Referrer Analytics & others.
Sponsored
Sponsor my site by donating to help support open-source projects, like WordPress Zero Spam, Referrer Analytics & others.
Sponsored
Do you have a great article to share you want to contribute? Contact me about your idea.

4 Comments on “WordPress Zero Spam”

# 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.

Leave a Reply

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.