Eliminate BuddyPress Spam Registrations

If you’ve ever managed a BuddyPress site, you know that SPAM registrations quickly became the bane of your existence. When we built NetDivvy, we were cleaning out thousands of spammy user records every single day. It didn’t take long for me to start brainstorming ways to get rid of the problem.

To solve this problem, I’ve seen people add image verification (captcha) or other user entry field to the registration process to verify that the user was human. Personally, I’ve always hated captchas, so I wasn’t about to subject our users to that torture. They’re so frustrating sometimes that I’ve made the decision to not sign up for a web site because they employed them.

So if we’re not going to burden our users with extra fields to fill out, how are we going to stop these spam bots?

We treat them like thieves. They’re stealing our most valuable asset, time. Just like in the movies, we have to outsmart them – we have to set a trap. In the computer world, we call this a honeypot. But in order for it to work, we have to get into their virtual heads and think like they do. Much like you do with a mouse trap, you have to tempt the spam bot with something they want. So, what are spam bots are looking for? Inputs to fill out.

Here’s the plan.

  1. Create an extra text field hidden via CSS
    1. Since it’s hidden from view, users won’t see it or fill it out
    2. Spambots will usually fill out all form elements so they don’t miss any required fields
  2. Upon submission, check the hidden text input to see if it has a value. If it does, it’s a spammer.

Sounds straight forward, right? After implementing this on NetDivvy, we have gone from thousands of SPAM registrations per day to one or two per week. Since it’s been so helpful to us, we’ve decided to release the functionality to the public. We’ve created a plugin that you can install and it will just work.

You can download the plugin here.

If you’re interested in seeing the code, continue reading.

First, we utilize the ‘bp_after_signup_profile_fields’ BuddyPress action to add our hidden text field.

We then check to see if the input is empty via the ‘bp_core_validate_user_signup’ filter and return an error if it is filled in. BuddyPress and WordPress take care of the rest.

If you find any errors, or have any additions, please submit an issue on the github repo.

Written by the Team at Pixel Jar

We hope you got something useful out of that post. If you'd like to read more we have an active blog with topics across the spectrum of website development. If you're researching information for a project we'd love to talk to you about it.

PowerPack Beaver Addons

PowerPack Beaver Addons for Beaver Builder

The PowerPack Beaver Addons for Beaver Builder adds a lot of supplemental features to a Beaver Builder website. We think there are a lot of potentially great features here, but we also know that the amount of functionality in this plugin can be overwhelming. Many of the features of the PowerPack Beaver Addons will be…
Read More

Can I Track That in Google Events?

People get excited when they see the power of website analytics. The data you get from analytics can be used to optimize your website for higher conversion. Having a higher conversion rate, of course, generally means more money for you. Woo hoo! The biggest question is, “Can I Track That in Google Events?” Once you…
Read More

How Can We Help You?

We want to build your next project.

Connect with Pixel Jar

Our Community

Subscribe to learn more about the goings on at Pixel Jar.
  • Note: Your email will be added to our CRM and be used to receive emails from Pixel Jar. You can unsubscribe at any time.

  • This field is for validation purposes and should be left unchanged.