Title: Selective reCAPTCHA Loader for CF7
Author: yasuo3o3
Published: <strong>September 17, 2025</strong>
Last modified: September 23, 2025

---

Search plugins

![](https://ps.w.org/selective-recaptcha-loader/assets/banner-772x250.png?rev=3368108)

![](https://ps.w.org/selective-recaptcha-loader/assets/icon-256x256.png?rev=3366441)

# Selective reCAPTCHA Loader for CF7

 By [yasuo3o3](https://profiles.wordpress.org/yasuo3o3/)

[Download](https://downloads.wordpress.org/plugin/selective-recaptcha-loader.0.2.1.zip)

 * [Details](https://wordpress.org/plugins/selective-recaptcha-loader/#description)
 * [Reviews](https://wordpress.org/plugins/selective-recaptcha-loader/#reviews)
 *  [Installation](https://wordpress.org/plugins/selective-recaptcha-loader/#installation)
 * [Development](https://wordpress.org/plugins/selective-recaptcha-loader/#developers)

 [Support](https://wordpress.org/support/plugin/selective-recaptcha-loader/)

## Description

**Selective reCAPTCHA Loader for CF7** is a performance optimization plugin that
intelligently controls when and where Google reCAPTCHA assets are loaded for Contact
Form 7 forms. Instead of loading reCAPTCHA on every page, this plugin provides two
modes to optimize your site’s performance.

#### Key Features

**🚀 Two Loading Modes:**
 – **Selective Mode (Default)**: Only loads reCAPTCHA 
on pages that contain Contact Form 7 forms – **Global Mode**: Always loads reCAPTCHA
on all front-end pages (traditional behavior)

**🎯 Smart Detection:**
 – Detects CF7 shortcodes in post content – Identifies CF7
blocks in Gutenberg editor – Whitelist-based override for specific pages

**⚙️ Advanced Configuration:**
 – Whitelist specific pages by ID, slug, or regex
patterns (pages matching the whitelist will **always** load reCAPTCHA) – Comprehensive
filter system for developers

#### How It Works

The plugin hooks into WordPress’s script enqueuing system with a priority of 120,
analyzing each page to determine if Contact Form 7 forms are present. Based on your
selected mode and detection results, it either allows or prevents reCAPTCHA assets
from loading.

**Caching Considerations:**
 – Per-page detection results are cached per request–
Cache automatically clears when plugin settings change

#### Developer Features

**Filters:**
 – `selerelo_is_form_page` – Modify form page detection – `selerelo_recaptcha_handles`–
Define which script handles to control

**Template Functions:**
 – `selerelo_should_load_recaptcha()` – Check if reCAPTCHA
will load – `selerelo_is_form_page()` – Check if page has forms – `selerelo_get_option()`–
Get plugin options

### Technical Details

**Minimum Requirements:**
 – WordPress 6.0 or higher – PHP 7.4 or higher – Contact
Form 7 5.8 or higher

**Performance Impact:**
 – Minimal overhead: Detection logic is lightweight and 
cached – Reduces script loading on pages without forms – Can significantly improve
page load times on form-free pages

**Security:**
 – All user inputs are sanitized and escaped – Uses WordPress nonces
for form submissions – Follows WordPress coding standards – No external API calls
or tracking

### 日本語版説明

**Selective reCAPTCHA Loader for CF7** は、Contact Form 7 のパフォーマンスを最適化
するプラグインです。全ページでreCAPTCHAを読み込む代わりに、フォームがあるページで
のみ読み込みます。

#### 主な特徴

**2つの読み込みモード:**
 – **Selectiveモード（推奨）**: フォームがあるページのみ
読み込み – **Globalモード**: 全ページでreCAPTCHA読み込み（従来方式）

**スマート検出:**
 – ショートコード、Gutenbergブロック内のフォームを検出 – ホワイト
リスト機能（ページID、スラッグ、正規表現対応、ホワイトリストに一致したページは**
必ず**reCAPTCHAを読み込みます）

#### インストール

 1. プラグインファイルを `/wp-content/plugins/selective-recaptcha-loader/` にアップ
    ロード
 2. 管理画面の「プラグイン」でプラグインを有効化
 3. 「設定」「Selective reCAPTCHA」で設定
 4. Selectiveモードのまま使用を推奨（ほとんどのサイトに最適）

#### 使い方

**Globalモード**: 全ページでreCAPTCHAを読み込みます。サイト全体にフォームがある場合
に適しています。

**Selectiveモード**: フォーム検出したページのみreCAPTCHAを読み込みます。最大のパフォーマンス
向上が期待できます。

#### 注意事項

**キャッシュプラグイン**:
 ほとんどのキャッシュプラグインと互換性があります。検出
ロジックはキャッシュ前に実行されます。

## Screenshots

 * [[
 * Main settings page showing the two modes and configuration options

## Installation

 1. Upload the plugin files to `/wp-content/plugins/selective-recaptcha-loader/`
 2. Activate the plugin through the ‘Plugins’ screen in WordPress
 3. Go to Settings  Selective reCAPTCHA to configure the plugin
 4. Choose your preferred mode (Selective is recommended for most sites)

## FAQ

### Does this plugin work without Contact Form 7?

No, this plugin requires Contact Form 7 to be active. It will gracefully deactivate
functionality if CF7 is not detected.

### Can I force reCAPTCHA to load on specific pages?

Yes! Add pages to the whitelist in settings using:
 – Post ID (e.g., 123) – Page
slug (e.g., contact) – Regular expression (e.g., /^https:\/\/example.com\/custom/)
You can also use the `selerelo_is_form_page` filter for custom logic.

### Is this plugin compatible with caching plugins?

Yes, the plugin is designed to work with caching plugins. The detection logic runs
before caching occurs and uses WordPress transients for performance.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Selective reCAPTCHA Loader for CF7” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ yasuo3o3 ](https://profiles.wordpress.org/yasuo3o3/)

[Translate “Selective reCAPTCHA Loader for CF7” into your language.](https://translate.wordpress.org/projects/wp-plugins/selective-recaptcha-loader)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/selective-recaptcha-loader/),
check out the [SVN repository](https://plugins.svn.wordpress.org/selective-recaptcha-loader/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/selective-recaptcha-loader/)
by [RSS](https://plugins.trac.wordpress.org/log/selective-recaptcha-loader/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.2.1 – 2025-09-23

 * Changed: Automation improvements for build and deployment processes

#### 0.2 – 2025-09-03

 * Removed: Auto mode (automatically migrated to Selective mode)
 * Removed: Per-post metabox functionality
 * Removed: reCAPTCHA v3 badge hiding and disclosure features
 * Simplified: Plugin now offers only Global and Selective modes for easier configuration
 * Performance: Removed unused transient caching and site-wide detection logic

#### 0.01 – 2025-09-02

 * Initial release
 * Global/Selective loading modes
 * Smart form detection (shortcodes, blocks)
 * Whitelist and template hint support
 * Complete internationalization (English/Japanese)
 * Developer filter system
 * WordPress 6.0+ and PHP 7.4+ compatibility

## Meta

 *  Version **0.2.1**
 *  Last updated **7 months ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **6.8.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [contact form 7](https://wordpress.org/plugins/tags/contact-form-7/)[forms](https://wordpress.org/plugins/tags/forms/)
   [optimization](https://wordpress.org/plugins/tags/optimization/)[performance](https://wordpress.org/plugins/tags/performance/)
   [recaptcha](https://wordpress.org/plugins/tags/recaptcha/)
 *  [Advanced View](https://wordpress.org/plugins/selective-recaptcha-loader/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/selective-recaptcha-loader/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/selective-recaptcha-loader/reviews/)

## Contributors

 *   [ yasuo3o3 ](https://profiles.wordpress.org/yasuo3o3/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/selective-recaptcha-loader/)