Skip to content

Speed up dashboard totals and batch Forms list entry counts - #3793

Open
Crabcyborg wants to merge 1 commit into
masterfrom
perf/forms-list-dashboard
Open

Crabcyborg wants to merge 1 commit into
masterfrom
perf/forms-list-dashboard

Conversation

@Crabcyborg

Copy link
Copy Markdown
Contributor

Changes

  • Batch entry counts for the current page of forms. Keep the per-form lookup when a site filters spam exclusion.
  • Sum completed payments by action before combining totals by currency. Skip the latest-form lookup when the dashboard already has entries.
  • Show dashboard cards and final totals immediately. Format earnings on the server and remove the count-up and staggered reveal.

Local profiling

Measured in authenticated Chrome on a site with 20 forms per list page and 61,820 entries.

Measurement Before After
Median navigation time until all six dashboard totals were readable 1.77 s 0.45 s
Dashboard database queries 76 73
Forms list database queries 109 90
Median Forms list DOMContentLoaded 531 ms 533 ms

The dashboard readability timings cover five loads per version across the animation change. The Forms list timings cover five warm loads per version. All 20 displayed entry counts and the six dashboard totals matched across versions.

Verification

Four focused PHPUnit tests passed with 14 assertions. Scoped PHPStan, PHP lint, PHPCS, ESLint and oxlint passed. Full-plugin Psalm reported four findings in untouched files. The local WordPress debug log also recorded header warnings during baseline and follow-up testing.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 54868ae and 60c09b7.

Files selected for processing: 6

  • classes/controllers/FrmDashboardController.php
  • classes/helpers/FrmFormsListHelper.php
  • classes/views/dashboard/templates/counters.php
  • js/formidable_dashboard.js
  • js/src/dashboard.js
  • stripe/models/FrmTransLitePayment.php
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@deepsource-io

deepsource-io Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 54868ae...60c09b7 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Dec 1, 2026 8:12p.m. Review ↗
JavaScript Dec 1, 2026 8:12p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant