89% sales-metrics-for-easy-digital-downloads

Code Review | Sales Metrics for Easy Digital Downloads

WordPress plugin Sales Metrics for Easy Digital Downloads scored 89% from 54 tests.

About plugin

  • Plugin page: sales-metrics-for...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 2, 2016
  • Latest release: Jul 2, 2016
  • Number of updates: 12
  • Update frequency: N/A
  • Top authors: chenster (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 965 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.09ms] Passed 4 tests

A check of server-side resources used by Sales Metrics for Easy Digital Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.72 ▼10.58
Dashboard /wp-admin3.31 ▲0.0146.13 ▼5.02
Posts /wp-admin/edit.php3.36 ▲0.0144.66 ▲1.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.55 ▼5.89
Media Library /wp-admin/upload.php3.24 ▲0.0134.22 ▲2.55

Server storage [IO: ▲2.57MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 190 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Sales Metrics for Easy Digital Downloads: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.46 ▲0.031.81 ▼0.5142.85 ▼1.25
Dashboard /wp-admin2,213 ▲255.85 ▲0.9598.82 ▼20.3239.55 ▼6.09
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0336.44 ▲3.3933.05 ▼0.85
Add New Post /wp-admin/post-new.php1,530 ▼323.53 ▲0.37581.90 ▼52.9553.57 ▼1.49
Media Library /wp-admin/upload.php1,398 ▲134.28 ▲0.0796.66 ▼9.1644.13 ▼0.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: sales report, easy digital downloads, edd report, edd, sales matrics...

sales-metrics-for-easy-digital-downloads/edd-sales-metrics.php 85% from 13 tests

The entry point to "Sales Metrics for Easy Digital Downloads" version 0.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("sales-metrics-for-easy-digital-downloads.php" instead of "edd-sales-metrics.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected23,523 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1311,5854,28219,729
CSS213363192,463
PHP85024301,331

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.00
▷ Minimum class complexity5.00
▷ Maximum class complexity46.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods735.00%
▷ Public methods1785.00%
▷ Protected methods00.00%
▷ Private methods315.00%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 compressed PNG files occupy 0.83MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/libraries/jqplot/css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.12KB0.15KB0.00%
includes/libraries/jqplot/css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png0.12KB0.15KB0.00%
includes/libraries/jqplot/css/cupertino/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
includes/libraries/jqplot/css/cupertino/images/ui-icons_72a7cf_256x240.png4.27KB4.11KB▼ 3.78%
assets/screenshot-2.png288.56KB102.99KB▼ 64.31%