Skip to content

Fix. Contacts Encoder. Simple precheck content before high-cost logic run. - #891

Open
alexandergull wants to merge 1 commit into
devfrom
cde-prefilter-shortcode.ag
Open

alexandergull wants to merge 1 commit into
devfrom
cde-prefilter-shortcode.ag

Conversation

@alexandergull

Copy link
Copy Markdown
Member

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved issues were identified, and all reviewed files are covered.

Pull request overview

Optimizes contact shortcode encoding by prechecking content before running expensive processing.

Changes:

  • Adds shared shortcode presence checks.
  • Short-circuits unnecessary encoding and exclusion processing.
  • Adds regression tests for fast paths and preserved behavior.
File summaries
File Description
tests/ApbctWP/ContactsEncoder/Shortcodes/EmailEncoderShortCodePrecheckTest.php Tests precheck behavior and round trips.
lib/Cleantalk/ApbctWP/ContactsEncoder/Shortcodes/ExcludedEncodeContentSC.php Applies prechecks to excluded shortcode handling.
lib/Cleantalk/ApbctWP/ContactsEncoder/Shortcodes/EncodeContentSC.php Applies prechecks before encoding and restoration.
lib/Cleantalk/ApbctWP/ContactsEncoder/Shortcodes/EmailEncoderShortCode.php Adds shared shortcode precheck logic.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 30.62%. Comparing base (968b546) to head (cb60257).

Files with missing lines Patch % Lines
...ntactsEncoder/Shortcodes/EmailEncoderShortCode.php 85.71% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #891      +/-   ##
============================================
+ Coverage     30.59%   30.62%   +0.03%     
- Complexity     6639     6651      +12     
============================================
  Files           292      292              
  Lines         26493    26507      +14     
============================================
+ Hits           8105     8119      +14     
  Misses        18388    18388              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@svedge
svedge requested review from svedge and removed request for svfcode September 18, 2026 04:23

@Glomberg Glomberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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