Support » Plugin: Contact Form 7 » A GTMetrix Test: Is Google reCAPTCHA v3 Slower Than v2?

  • linux4me2

    (@linux4me2)


    When I read @eharris‘s post, I started wondering if Google reCAPTCHA v3 was actually slower and taking more resources than v2. I had looked at the GTmetrix score for one of my sites after seeing mention here that it was slower, and I didn’t see a significant difference, but I didn’t really look into it in detail. So I decided to do a little test.

    I started with a test site that I’d already updated to CF 7 5.1 with Google reCAPTCHA v3. I made sure both pages were cached, then ran GTMetrix three times (for an average) on both the Home and Contact pages. Then, I rolled back to v. 5.0.5 of CF 7, regenerated v2 reCAPTCHA keys, added back the [recaptcha] tag, made sure both pages were cached, and re-ran GTMetrix three times for each page. Here are the results:

    v3
    Home: 1.6s, 478kb, 46 requests
    Contact: 1.5s, 439kb, 46 requests

    v2
    Home: 1.0s, 238kb, 34 requests
    Contact: 1.4s, 416kb, 48 requests

    So, if that’s a valid test, the answer appears to be that Google reCAPTCHA v3 is significantly slower on non-contact-form pages and uses more resources on non-contact-form pages. V2 makes more requests on contact-form pages, but downloads less and is (maybe significantly) faster than v3.

    This was done on a dedicated server with 32 GB of RAM and a 1 G download port, so the speed differences might be more dramatic on a shared server or VPS with less RAM, though possibly not, because the scripts are being downloaded from Google’s servers.

    I was a proponent of Google reCAPTCHA v3. I truly hate that “I’m not a robot” checkbox because I always have to click on a bunch of pictures to get past it, but now I’m wondering if it wouldn’t be better to stick with v2. Google does say they’re going to keep supporting it…

Viewing 15 replies - 1 through 15 (of 18 total)
  • 32diego

    (@32diego)

    Interesting to know!

    Is there a reason v3 loads on every page and not just the contact page?

    Stijn

    (@claitonlord)

    Is there a reason v3 loads on every page and not just the contact page?

    Thats exactly what i wanna know also.

    Takayuki Miyoshi should really give users the option to choose between V2 or V3, since Google announced it keeps updating V2. It takes pretty long. I expected an update already.

    • This reply was modified 7 months ago by  Stijn.
    linux4me2

    (@linux4me2)

    Google recommends that you load it on as many pages as possible so that the accuracy of the bot-versus-human score is as high as possible. That’s one reason.

    32diego

    (@32diego)

    Google recommends that you load it on as many pages as possible so that the accuracy of the bot-versus-human score is as high as possible. That’s one reason.

    In that case, it would be much better to offer the option for V2 as well. Especially as V3 does not work well on low traffic websites (I am getting spam through even with a new V3 API key installed)

    linux4me2

    (@linux4me2)

    @32diego, I don’t think the reason you’re getting spam is because v3 doesn’t work well on low-traffic sites. It’s because the developer of CF 7 made the decision to allow the form to be submitted if the Google reCAPTCHA v3 token isn’t set, which is the case with most bots that don’t run javascript. There’s a hack here to fix it, and it nips spam in the bud with CF 7 and v3.

    32diego

    (@32diego)

    It’s because the developer of CF 7 made the decision to allow the form to be submitted if the Google reCAPTCHA v3 token isn’t set

    This seems like a terrible idea and should be controllable through a setting.

    linux4me2

    (@linux4me2)

    @32diego, Yes, it has certainly caused a lot of people to get very upset. I suggested the setting in another post, but after doing the speed test, if I had to choose, I think I’d rather have him add the option of using v2 or v3. If given the choice, I’m thinking I’d go with v2 after the results of the tests.

    32diego

    (@32diego)

    Yes i would also much prefer V2 option. Not had a single issue with that.
    Are there any other captcha plugins for CF7 out there?

    Can you link me to the hack you have found?

    linux4me2

    (@linux4me2)

    @32diego, I don’t know of any other captcha plugins for CF 7 at present. You used to have to use Really Simple CAPTCHA with it before it came integrated.

    The hack is to the file /wp-content/plugins/contact-form-7/modules/recaptcha.php. Simply change line 112 from:

    
    return $spam;
    

    to:

    
    return true;
    

    All it’s doing is saying that if the token isn’t set, say it’s spam. It may be overwritten when the plugin is updated, but hopefully the problem will be taken care of by then, so it won’t matter.

    32diego

    (@32diego)

    thanks for that. Will see how I get on

    I don’t know of any other captcha plugins for CF7 at present.

    All it’s doing is saying that if the token isn’t set, say it’s spam.

    The hack/fix is explained & discussed in detail at ReCaptcha V3 — if g-recaptcha-response is empty, submission never be verified.

    For what it’s worth, I’ve been consistently getting GTMetrix email notices about my sites taking longer than 5 seconds to load since updating CF7. I’ve got a small handful of sites, some of which use CF7, some of which do not. I’ve only been getting the slow load notices on sites that use CF7.

    This strongly suggests that ReCAPTCHA v3 is indeed significantly slower than v2. Given that each of my sites only use this plugin on one page, and don’t benefit from having ReCAPTCHA loading on every single page, this is pretty problematic. I get that Google wants it loading on as many pages as possible to improve accuracy, but I don’t really want all of my sites slowing way down to improve their algorithm, especially since ReCAPTCHA v2 worked perfectly well for my site. I’m getting NO marginal benefit from this slowdown.

    I’d love it if this plugin could be configured to only load when it’s actually used. My bedroom lights don’t turn on when I get in my car, so why should my contact form plugin load when a user goes to my front page? 😀

    A quick web search confirms it. Those who have tested reCAPTCHA v3 show it to be quite a lot slower, by 1/3 to 1/2 second when everything is running smoothly, and even by as much as THIRTY SECONDS when one of Google’s 11-20 separate server requests (why?!?) encounters a problem.

    http://pagepipe.com/how-google-no-captcha-captcha-slows-down-your-mobile-site/

    Hopefully Google will address this as time goes on, but for now… reCAPTCHA v3 basically drags your website down, on every page, post, search result, etc, whether or not that page actually needs it.

    linux4me2

    (@linux4me2)

    @eharris, I hope you’re right. In the meantime, I’ve rolled all my sites back to CF 7 5.0.5.

Viewing 15 replies - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.