84% edd-toolbar

Code Review | Easy Digital Downloads Toolbar

WordPress plugin Easy Digital Downloads Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: edd-toolbar
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2012
  • Latest release: Feb 21, 2019
  • Number of updates: 33
  • Update frequency: every 75.9 days
  • Top authors: daveshine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /13,481 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼1.95ms] Passed 4 tests

Server-side resources used by Easy Digital Downloads Toolbar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2448.60 ▲7.83
Dashboard /wp-admin3.58 ▲0.2352.97 ▼14.48
Posts /wp-admin/edit.php3.70 ▲0.3356.94 ▲6.12
Add New Post /wp-admin/post-new.php6.16 ▲0.27101.18 ▼5.94
Media Library /wp-admin/upload.php3.51 ▲0.2844.89 ▲6.50

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Digital Downloads Toolbar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,230 ▲46914.38 ▲0.193.26 ▲1.5244.13 ▼0.59
Dashboard /wp-admin2,403 ▲2265.69 ▲0.0291.80 ▼7.8940.53 ▼7.31
Posts /wp-admin/edit.php2,311 ▲2112.03 ▲0.0538.09 ▼1.3433.80 ▼5.66
Add New Post /wp-admin/post-new.php1,735 ▲20923.11 ▼0.07620.32 ▼75.0750.20 ▼7.09
Media Library /wp-admin/upload.php1,608 ▲2114.19 ▼0.08107.35 ▼2.2544.29 ▼3.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/edd-toolbar/includes/eddtb-resources.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/edd-toolbar/edd-toolbar.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/edd-toolbar/includes/eddtb-admin.php:28
    • > PHP Notice
      Undefined variable: eddgroup in wp-content/plugins/edd-toolbar/includes/eddtb-resources.php on line 23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

edd-toolbar/edd-toolbar.php Passed 13 tests

The principal PHP file in "Easy Digital Downloads Toolbar" v. 1.5.1 is loaded by WordPress automatically on each request
125 characters long description:
This plugin adds useful admin links and resources for the Easy Digital Downloads plugin to the WordPress Toolbar / Admin Bar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,193 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP73906771,131
PO File34708321,062

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-eddtb-brown.png0.88KB0.75KB▼ 15.13%
images/icon-eddtb2-blue.png0.95KB0.88KB▼ 7.38%
images/icon-eddtb2-red.png0.70KB0.88KB0.00%
images/icon-eddtb2-green.png0.70KB0.88KB0.00%
images/icon-eddtb-red.png0.59KB0.72KB0.00%