Skip to content

New. Connection reports. Reports for API calls implemented. - #918

Merged
alexandergull merged 7 commits into
devfrom
New--Connection-reports-Reports-for-API-calls-implemented-VI
Nov 16, 2026
Merged

alexandergull merged 7 commits into
devfrom
New--Connection-reports-Reports-for-API-calls-implemented-VI

Conversation

@Glomberg

Copy link
Copy Markdown
Member

@Glomberg
Glomberg requested a review from svedge October 26, 2026 14:30
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.84665% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.37%. Comparing base (96e8410) to head (bbe219e).

Files with missing lines Patch % Lines
lib/Cleantalk/ApbctWP/ConnectionReports.php 96.65% 10 Missing ⚠️
lib/Cleantalk/ApbctWP/API.php 78.57% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #918      +/-   ##
============================================
+ Coverage     36.90%   37.37%   +0.46%     
- Complexity     7434     7498      +64     
============================================
  Files           301      301              
  Lines         28115    28338     +223     
============================================
+ Hits          10377    10591     +214     
- Misses        17738    17747       +9     

☔ 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.

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.

🟡 Changes recommended

Two credential-redaction gaps allow hoster and embedded site access keys to be stored in diagnostic reports.

2 open issues
What changed in this PR

Extends the existing connection-reporting system to track API calls separately from Anti-Spam moderation requests.

Changes:

  • Records API connection failures with request sanitization and separate statistics and retention limits.
  • Adds report-source and API-method fields to storage.
  • Displays API request types and statistics in settings and email reports.
File Description
tests/​ApbctWP/​TestConnectionReports.php Adds API-reporting checks and cleanup; excluded from review.
lib/​Cleantalk/​Common/​Schema.php Adds source and method-name columns.
lib/​Cleantalk/​ApbctWP/​PluginSettingsPage/​SummaryAndSupportRenderer.php Allows paragraphs in report HTML.
lib/​Cleantalk/​ApbctWP/​ConnectionReports.php Implements API reporting, sanitization, statistics, and display.
lib/​Cleantalk/​ApbctWP/​API.php Passes API results to connection reporting.

Review effort: Balanced

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.

🟡 Changes recommended

API failures can be misclassified and bypass rotation limits before schema updates complete, while truncation without mbstring can corrupt UTF-8 and lose entire request payloads.

2 open issues
2 resolved since last review
1 file not reviewed
  • css/cleantalk-admin-settings-page.min.css: Generated file

Review effort: Balanced

Done to avoid failure on report creation due plugin update timeframe.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@alexandergull
alexandergull requested a review from svedge November 13, 2026 13:06
Done to avoid payload missing in case of UTF-8 issues.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@alexandergull
alexandergull force-pushed the New--Connection-reports-Reports-for-API-calls-implemented-VI branch from b9316ca to bbe219e Compare November 13, 2026 13:13
@alexandergull
alexandergull merged commit d78dea8 into dev Nov 16, 2026
9 checks passed
@alexandergull
alexandergull deleted the New--Connection-reports-Reports-for-API-calls-implemented-VI branch November 16, 2026 09:57
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