PHPackages                             serfe/magento2-smart-recaptcha-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. serfe/magento2-smart-recaptcha-loader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

serfe/magento2-smart-recaptcha-loader
=====================================

This Magento 2 module optimizes the performance of reCAPTCHA by loading its related files only when a form field gains focus.

1.1.0(1y ago)21.0k↓50%1MITJavaScript

Since Nov 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Serfe/magento-2-smart-recaptcha-loader)[ Packagist](https://packagist.org/packages/serfe/magento2-smart-recaptcha-loader)[ RSS](/packages/serfe-magento2-smart-recaptcha-loader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Magento 2 Smart reCaptcha Loader
================================

[](#magento-2-smart-recaptcha-loader)

[![Latest Stable Version](https://camo.githubusercontent.com/a1a203c70c540a63058bba68b999514dbfed7fbee2ce82afc78583c33c51e92e/68747470733a2f2f706f7365722e707567782e6f72672f73657266652f6d6167656e746f322d736d6172742d7265636170746368612d6c6f616465722f76657273696f6e)](https://packagist.org/packages/serfe/magento2-smart-recaptcha-loader)

Boost your Magento 2 store's performance and user experience with the **Smart reCaptcha Loader** module. This extension loads the reCAPTCHA API only when users interact with form fields, improving initial page load times without compromising security.

Key Features
------------

[](#key-features)

- **On-Demand reCAPTCHA Loading**: Triggers the reCAPTCHA API only when a form field is focused, enhancing initial page performance.
- **Performance Optimization**: Reduces unnecessary reCAPTCHA loads, creating a smoother and faster user experience.
- **Enhanced User Interaction**: Keeps the page light and responsive until user interaction, ensuring optimal load times.

Performance Comparison
----------------------

[](#performance-comparison)

### Product Detail Page (PDP) Performance

[](#product-detail-page-pdp-performance)

Below are performance comparisons on the Product Detail Page (PDP), using Magento 2.4.7-p3, Luma theme, and sample data:

#### Without the Module Enabled:

[](#without-the-module-enabled)

[![PDP Without Module](docs/pdp_without_module.png)](docs/pdp_without_module.png)

#### With the Module Enabled:

[](#with-the-module-enabled)

[![PDP With Module](docs/pdp_with_module.png)](docs/pdp_with_module.png)

These images illustrate how the module reduces script load by deferring reCAPTCHA until it's needed.

### On-Focus Loading in Action

[](#on-focus-loading-in-action)

See the GIF below to observe how the module loads reCAPTCHA only when the user focuses on a form field:

[![On Focus Loading](docs/on_focus_loading.gif)](docs/on_focus_loading.gif)

Installation Guide
------------------

[](#installation-guide)

To install the **Smart reCaptcha Loader** module, follow these steps:

1. **Install via Composer**: Run the following command in your terminal:

    ```
    composer require serfe/magento2-smart-recaptcha-loader
    ```
2. **Enable and Update**: After installation, run these commands from the Magento root directory to enable and set up the module:

    ```
    bin/magento module:enable Serfe_SmartRecaptchaLoader
    bin/magento setup:upgrade
    bin/magento cache:clean
    ```

Integration with Magento reCAPTCHA Settings
-------------------------------------------

[](#integration-with-magento-recaptcha-settings)

The **Smart reCaptcha Loader** module is fully compatible with all Magento-native reCAPTCHA settings for the storefront. It supports flexible integration with reCAPTCHA v2 challenge (Invisible and "I am not a robot") and reCaptcha v3 (Invisible) score based variants, ensuring seamless protection across various customer interaction points. This includes areas such as Customer Login, Account Creation, Contact Us, Product Reviews, Checkout, and more.

[![reCAPTCHA Loader Compatibility](docs/reCaptchaLoaderCompatibility.png)](docs/reCaptchaLoaderCompatibility.png)

This adaptability enables store owners to apply reCAPTCHA security precisely where it's needed, enhancing the user experience while maximizing site security and performance.

### Personalization

[](#personalization)

If you wish to have some changes done into this module to adapt it to your specific needs, theme or situation, feel free to contact us to make the adjustments.

About Us
--------

[](#about-us)

[Serfe](https://www.serfe.com/?utm_medium=referral_profile&utm_source=github&utm_campaign=115959) develops complete e-commerce solutions focused on performance, scalability, and usability, specializing in Magento 2 and other platforms. Explore our services and expertise on our website.

### Contributing

[](#contributing)

We welcome contributions to this module. To contribute, fork the repository, make your changes, and submit a pull request.

---

This module was inspired by [Magento Security Package PR #334](https://github.com/magento/security-package/pull/334).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance44

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~120 days

Total

2

Last Release

437d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36e5ddafa943e9e978ab75c3fcd52ee282d0a9d2589233d1583fa505b0088e6d?d=identicon)[Serfe-com](/maintainers/Serfe-com)

---

Top Contributors

[![Serfe-com](https://avatars.githubusercontent.com/u/153220375?v=4)](https://github.com/Serfe-com "Serfe-com (3 commits)")

### Embed Badge

![Health badge](/badges/serfe-magento2-smart-recaptcha-loader/health.svg)

```
[![Health](https://phpackages.com/badges/serfe-magento2-smart-recaptcha-loader/health.svg)](https://phpackages.com/packages/serfe-magento2-smart-recaptcha-loader)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
