Skip to content

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

Open
Glomberg wants to merge 3 commits into
devfrom
New--Connection-reports-Reports-for-API-calls-implemented-VI
Open

Glomberg wants to merge 3 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 97.10145% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.18%. Comparing base (a7969cb) to head (fc51cb6).
⚠️ Report is 12 commits behind head on dev.

Files with missing lines Patch % Lines
lib/Cleantalk/ApbctWP/ConnectionReports.php 98.09% 5 Missing ⚠️
lib/Cleantalk/ApbctWP/API.php 78.57% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #918      +/-   ##
============================================
+ Coverage     34.27%   35.18%   +0.90%     
- Complexity     7011     7156     +145     
============================================
  Files           298      298              
  Lines         27325    27700     +375     
============================================
+ Hits           9367     9746     +379     
+ Misses        17958    17954       -4     

☔ 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

*/
private $api_sensitive_keys = array(
'auth_key',
'api_key',
Comment on lines +700 to +703
if (in_array(strtolower((string)$key), $this->api_sensitive_keys, true)) {
$result[$key] = '***';
continue;
}

This branch has not been deployed

No deployments
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.

3 participants