80% easy-digital-downloads-pricing-select

Code Review | Easy Digital Downloads - Pricing Select

WordPress plugin Easy Digital Downloads - Pricing Select scored80%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Nov 3, 2014
  • Latest release: Nov 3, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: section214 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,166 total downloads

Benchmarks

Plugin footprint 65% 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: ▼6.27MB] [CPU: ▼872,513.18ms] Passed 4 tests

Server-side resources used by Easy Digital Downloads - Pricing Select
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼18.805.82 ▼3,489,837.15
Dashboard /wp-admin2.14 ▼1.257.25 ▼58.80
Posts /wp-admin/edit.php2.15 ▼1.268.35 ▼46.37
Add New Post /wp-admin/post-new.php2.15 ▼3.796.64 ▼110.40
Media Library /wp-admin/upload.php2.15 ▼1.135.93 ▼30.74

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Easy Digital Downloads - Pricing Select: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.33 ▼0.021.76 ▼0.2346.21 ▲6.00
Dashboard /wp-admin2,195 ▲185.55 ▼0.1188.44 ▲3.5338.05 ▼5.14
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0135.49 ▼6.6637.86 ▲1.76
Add New Post /wp-admin/post-new.php1,526 ▼1123.17 ▲4.90685.71 ▲44.2459.49 ▼9.39
Media Library /wp-admin/upload.php1,400 ▲64.12 ▼0.05112.07 ▲13.5447.34 ▲4.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/easy-digital-downloads-pricing-select/edd-pricing-select.php+132
    Undefined property: EDD_Extension_Activation::$run
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: variable pricing, easy digital downloads

easy-digital-downloads-pricing-select/edd-pricing-select.php 92% from 13 tests

The primary PHP file in "Easy Digital Downloads - Pricing Select" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-digital-downloads-pricing-select.php" instead of "edd-pricing-select.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected99 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2439291
Markdown1508

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.50
▷ Minimum class complexity5.00
▷ Maximum class complexity6.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin