Skip to content

Add Shield silentCAPTCHA integration#1517

Open
paulgoodchild wants to merge 9 commits into
wpeverest:developfrom
paulgoodchild:shield_silentcaptch_integration
Open

Add Shield silentCAPTCHA integration#1517
paulgoodchild wants to merge 9 commits into
wpeverest:developfrom
paulgoodchild:shield_silentcaptch_integration

Conversation

@paulgoodchild
Copy link
Copy Markdown

@paulgoodchild paulgoodchild commented Feb 24, 2026

Changes proposed in this Pull Request:

This commit introduces Shield silentCAPTCHA integration for Everest Forms, adds global diagnostics for Shield threshold=0 configuration, and includes a minimal core admin-assets fix for the evf-upgrade JS data contract.

Implementation

  • Register ShieldSilentCaptcha addon in addons/Addons.php.
  • Add addon implementation in addons/ShieldSilentCaptcha/ShieldSilentCaptcha.php:
    • Adds Shield provider row to CAPTCHA Integration settings.
    • Adds per-form Shield toggle in builder security settings.
    • Adds form processing gate via everest_forms_process_initial_errors.
    • Uses Shield bot verdict callable priority:
      • \FernleafSystems\Wordpress\Plugin\Shield\Functions\test_ip_is_bot
      • shield_test_ip_is_bot
    • Uses Shield threshold callable priority:
      • \FernleafSystems\Wordpress\Plugin\Shield\Functions\get_silentcaptcha_bot_threshold
      • shield_get_silentcaptcha_bot_threshold
    • Preserves fail-open behavior for callable absence/throwable/non-strict verdicts.
    • Adds threshold-zero global settings notice:
      • "Shield is active and running, but your Shield silentcaptcha bot threshold is set to zero."
    • Evaluates threshold only after Shield availability is confirmed.
    • Evaluates threshold only when callable exists; throwable/non-numeric results fail open.
    • Caches threshold-zero evaluation result per request lifecycle.
    • Reuses a shared helper for notice + Learn More link markup.
  • Add Shield icon asset at assets/images/captcha/shield-security-logo.png.

Core bug fix

  • Update includes/admin/class-evf-admin-assets.php to localize evf_data directly to the evf-upgrade handle.
  • Add inline code comments documenting the bug and rationale.
  • Fixes the evf_data-is-undefined path for evf-upgrade in affected admin contexts.

How to test the changes in this Pull Request:

Tests

  • Add tests/phpunit/includes/class-shield-silent-captcha-test.php with coverage for:
    • verdict normalization and callable ordering.
    • fail-open behavior for missing/throwing callables.
    • closed-gate and existing-error short-circuit behavior.
    • strict-true block header behavior and AMP bypass.
    • global toggle and builder selector contracts.
    • threshold path behavior:
      • threshold callable missing => standard available branch.
      • threshold callable throws => standard available branch.
      • threshold 0 => threshold-warning branch.
      • threshold non-zero => standard available branch.
      • Shield unavailable => threshold check short-circuited.
      • threshold lookup cache => single threshold callable invocation across repeated calls.
    • behavior-focused assertions using branch instrumentation/call counts (no fragile string-content assertions for threshold message copy).
  • Add tests/phpunit/includes/class-shield-silent-captcha-flow-test.php with flow coverage for:
    • reCAPTCHA failure short-circuit before Shield initial-errors stage.
    • reCAPTCHA success path reaching initial-errors stage where Shield can apply.

Types of changes:

  • New feature (non-breaking change which adds functionality)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully ran tests with your changes locally?
  • Have you updated the documentation accordingly?

Changelog entry

Added support for Shield Security's silentCAPTCHA Bot SPAM protection features alongside Google reCAPTCHA & CloudFlare Turnstile.

… evf_data localization fix

This commit introduces Shield silentCAPTCHA integration for Everest Forms, adds global diagnostics for Shield threshold=0 configuration, and includes a minimal core admin-assets fix for the evf-upgrade JS data contract.

Implementation
- Register ShieldSilentCaptcha addon in addons/Addons.php.
- Add addon implementation in addons/ShieldSilentCaptcha/ShieldSilentCaptcha.php:
  - Adds Shield provider row to CAPTCHA Integration settings.
  - Adds per-form Shield toggle in builder security settings.
  - Adds form processing gate via everest_forms_process_initial_errors.
  - Uses Shield bot verdict callable priority:
    - \FernleafSystems\Wordpress\Plugin\Shield\Functions\test_ip_is_bot
    - shield_test_ip_is_bot
  - Uses Shield threshold callable priority:
    - \FernleafSystems\Wordpress\Plugin\Shield\Functions\get_silentcaptcha_bot_threshold
    - shield_get_silentcaptcha_bot_threshold
  - Preserves fail-open behavior for callable absence/throwable/non-strict verdicts.
  - Adds threshold-zero global settings notice:
    - "Shield is active and running, but your Shield silentcaptcha bot threshold is set to zero."
  - Evaluates threshold only after Shield availability is confirmed.
  - Evaluates threshold only when callable exists; throwable/non-numeric results fail open.
  - Caches threshold-zero evaluation result per request lifecycle.
  - Reuses a shared helper for notice + Learn More link markup.
- Add Shield icon asset at assets/images/captcha/shield-security-logo.png.

Core bug fix
- Update includes/admin/class-evf-admin-assets.php to localize evf_data directly to the evf-upgrade handle.
- Add inline code comments documenting the bug and rationale.
- Fixes the evf_data-is-undefined path for evf-upgrade in affected admin contexts.

Tests
- Add tests/phpunit/includes/class-shield-silent-captcha-test.php with coverage for:
  - verdict normalization and callable ordering.
  - fail-open behavior for missing/throwing callables.
  - closed-gate and existing-error short-circuit behavior.
  - strict-true block header behavior and AMP bypass.
  - global toggle and builder selector contracts.
  - threshold path behavior:
    - threshold callable missing => standard available branch.
    - threshold callable throws => standard available branch.
    - threshold 0 => threshold-warning branch.
    - threshold non-zero => standard available branch.
    - Shield unavailable => threshold check short-circuited.
    - threshold lookup cache => single threshold callable invocation across repeated calls.
  - behavior-focused assertions using branch instrumentation/call counts (no fragile string-content assertions for threshold message copy).
- Add tests/phpunit/includes/class-shield-silent-captcha-flow-test.php with flow coverage for:
  - reCAPTCHA failure short-circuit before Shield initial-errors stage.
  - reCAPTCHA success path reaching initial-errors stage where Shield can apply.
@paulgoodchild paulgoodchild changed the title Add Shield silentCAPTCHA integration, threshold-zero diagnostics, and… Add Shield silentCAPTCHA integration Feb 24, 2026
som3669 and others added 8 commits April 20, 2026 17:18
* add option to download and copy the logs

* fix: log button responsive with issue

* update:review comment
* add: integrations and payments tab

* sidebar design update

* update: integration design

* update: opacity and icon

* remove unwanted class

* remove unwanted class

* fix text domain

* fix class issue

* fix class exist

* fix duplicate class issue
…lexibility. (wpeverest#1542)

* option to send form static reporting at a time

* fix send test report email address update issue

* remove: nps

* fix two time mail send while sending report mail

* update: review report

* update: review report
* Fix - Coupon limit validation

* fix: coupons not applied issue

* pass: coupon data for coupon calculation on backend

* pass: all coupon data for the coupon validation

* merge pre-develop into EVF-2293-enhance/coupons

* Dev - Payment Summary Field. (wpeverest#1545)

* added: payment sumary description

* fix: show payment history field on pro version

* fix: saving the form due to the payment summary

* added: show hide button for the payment history

* fix: class not found issue

* changelog updated

* changelog updated
* Initial Commit

* UI updates for field adding popover

* Placement updates for fields popover

* Popover added for row add button too

* Ui updates for popover trigger button

* Popover arrow UI added

* Removed non-important comments

* Layout options such as one-column container, two-column container, etc.

* Enable grouping feature for fields.

* fix : Field still hoverable after Selected

* fix : Field popover placement issue fixed

* fix: popup clipping issue

* update: update selected count while duplicate

* update:on group delete redirect to add field

---------

Co-authored-by: som3669 <somshrestha3669@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants