Stop spam sign ups with subscription plugin

Is there a captcha or akismet add on for the Subscribe by email plugin? It's driving us nuts.

  • Michelle Shull
    • DEV MAN’s Apprentice

    Hey there, Luby!

    I did some searching on the forum, and per the dev, your best option here is to make sure subscribers have to confirm their emails. Then, anyone who doesn't confirm (99% of spammers won't) is automagically flushed from the system after seven days.

    It can create some messy email situations for you as an admin, however, so I'm going to add a feature request for a captcha option in the Subscribe by Email widget.

    Spammers are a scourge, I'm so sorry you're getting hit so hard right now.

  • LubyG
    • Site Builder, Child of Zeus

    Yes, some of the .ru spammers have confirmed but most have not. A captcha would probably help a lot. Too bad akismet doesn't work here. I know akismet uses more than just the email. It uses the web address and links to determine spammers.

    I saw a security plugin that used an invisible field to humans but not to bots. If the field got filled in it was automatically deleted. Nice for bots without resorting to captcha.

  • Ignacio
    • HummingBird

    Hi @LubyG

    There's not a captcha for Subscribe By Email. We want to keep it as simple as we can. There are ways to insert captchas but you'd need to do it yourself. There are a few hooks in shortcode, widget and follow button for that purpose:

    Widget:

    do_action( 'sbe_widget_form_fields' );
    apply_filters( 'sbe_widget_validate_form', $errors, $email, $fields_to_save );

    Shortcode:

    do_action( 'sbe_shortcode_before_fields' );
     apply_filters( 'sbe_shortcode_validate_form', $errors, $email, $fields_to_save );

    Follow:

    do_action( 'sbe_follow_button_form_fields' );
    apply_filters( 'sbe_follow_button_validate_form', $this->errors, $email, $fields_to_save );

    You can hook those actions/filters to add your own captcha.

    What I could do though is to send admin notifications once the user has CONFIRMED the subscription. Right now, the notification is sent whenever a user is subscribed but I guess would be better if the plugin send it when it's confirmed. I think that would avoid many emails.

    I'm about to release a new version (today/tomorrow) with a few fixes more.

    If you need help with the captcha code, I could give you some help to start with it.

    Regards.
    Ignacio.

  • Ignacio
    • HummingBird

    Hi @Mika

    Sorry for the delay.

    First of all, download the following plugin and activate it (if your site is a multisite, network activate it): https://wordpress.org/plugins/captcha/

    Now, download the attached zip, unzip it and upload it to your wp-content/mu-plugins folder, you won't need to activate it. If the mu-plugins folder does not exist, just create it.

    You should start to see captchas in the forms. It's a pretty simple one but if you need a more complex Captcha you'll need to hire a developer for that. I think, however this should work for most of the cases.

    Regards.
    Ignacio.

  • Mika
    • The Bug Hunter

    Hey Ignacio.

    I just added the code but unfortunately it still does not work in the widget area. However, it does work with the shortcode.

    When it shows with the shortcode, it displays above the email area, is it possible to add it below? :slight_smile:

    Sincerely,
    Mika

    • Mika
      • The Bug Hunter

      Ignacio,

      Thanks for your reply.

      Actually, funny enough, it seems to be working now.

      Last thing, when it shows with the shortcode, it displays above the email area, is it possible to add it below? :slight_smile:

      Sincerely,
      Mika

  • Mika
    • The Bug Hunter

    Hey Ignacio.

    As mentioned, I got it working. However, when using the shortcode, the captcha filed is placed above the email field. Please see screenshot.

    I tried to solve this by adding 999 as the placement in the add_action, however, it didn't work.

    Do you know how can I place the captcha field below the email field?

    Sincerely,
    Mika

  • Mika
    • The Bug Hunter

    Hi Ignacio.

    I looked at the other hooks and found the solution to my issue. I change the hook for the shortcode to the following code, which did the trick :slight_smile:
    add_action( 'sbe_follow_button_form_fields', 'display_sbe_captcha' );

    Sincerely,
    Mika

  • Mika
    • The Bug Hunter

    Ignacio,

    Do you by any change know how I can stop the input field from moving on every page load?

    Sometimes it is to the left of the math, somethings it is in the middle and sometimes it is to the right. I would like the input field to display on the right always.

    Sincerely,
    Mika

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.