89% edd-enhanced-sales-reports

Code Review | EDD Enhanced Sales Reports

WordPress plugin EDD Enhanced Sales Reports scored89%from 54 tests.

About plugin

  • Plugin page: edd-enhanced-sale...
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.3
  • WordPress version: 6.3.1
  • First release: Dec 8, 2018
  • Latest release: Aug 11, 2023
  • Number of updates: 29
  • Update frequency: every 58.9 days
  • Top authors: pluginsandsnippets (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /1,433 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.72ms] Passed 4 tests

This is a short check of server-side resources used by EDD Enhanced Sales Reports
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.61 ▼0.19
Dashboard /wp-admin3.39 ▲0.0963.36 ▲11.66
Posts /wp-admin/edit.php3.50 ▲0.1552.30 ▼14.50
Add New Post /wp-admin/post-new.php5.97 ▲0.0897.06 ▼2.03
Media Library /wp-admin/upload.php3.31 ▲0.0840.09 ▲5.86

Server storage [IO: ▲22.78MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/edd-enhanced-sales-reports/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 753 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for EDD Enhanced Sales Reports
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.23 ▼1.061.57 ▼0.1642.13 ▼1.74
Dashboard /wp-admin2,223 ▲204.88 ▼0.01110.34 ▲4.1040.50 ▲0.25
Posts /wp-admin/edit.php2,102 ▼12.00 ▼0.0539.18 ▼2.1036.31 ▲1.77
Add New Post /wp-admin/post-new.php1,547 ▲2123.19 ▲5.67642.85 ▼25.5661.18 ▲5.06
Media Library /wp-admin/upload.php1,402 ▲24.20 ▼0.05104.88 ▲2.4746.05 ▲1.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (23 tag instead of maximum 10)
The official readme.txt is a good inspiration

edd-enhanced-sales-reports/edd-enhanced-sales-reports.php 92% from 13 tests

The main PHP script in "EDD Enhanced Sales Reports" version 1.1.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 551 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected102,454 lines of code in 731 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3516,70011,08663,265
HTML25812028,838
PHP319419424,875
TypeScript615762,0392,860
CSS15250612,397
JSON400137
Markdown613045
YAML24419
SVG30018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity66.20
▷ Minimum class complexity5.00
▷ Maximum class complexity203.00
Average method complexity6.05
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods62
▷ Static methods1625.81%
▷ Public methods5487.10%
▷ Protected methods00.00%
▷ Private methods812.90%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.82MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendor/chartjs/dist/docs/assets/img/init_flowchart.ee5be600.png24.57KB5.09KB▼ 79.29%
assets/vendor/chartjs/dist/docs/assets/img/render_flowchart.41a98316.png99.96KB22.18KB▼ 77.81%
assets/images/promotions/plugin-edd-landing-pages.png261.98KB286.63KB0.00%
assets/images/promotions/plugin-edd-advanced-shortcodes.png137.51KB137.55KB0.00%
assets/vendor/chartjs/dist/docs/assets/img/scale_flowchart.fa1ab63e.png57.18KB13.13KB▼ 77.03%