84% edd-blocks

Code Review | Easy Digital Downloads - Blocks

WordPress plugin Easy Digital Downloads - Blocks scored 84% from 54 tests.

About plugin

  • Plugin page: edd-blocks
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Nov 20, 2018
  • Latest release: Feb 20, 2020
  • Number of updates: 10
  • Update frequency: every 45.8 days
  • Top authors: sumobi (80%)cklosows (30%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 7,847 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Analyzing server-side resources used by Easy Digital Downloads - Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.24 ▼3.09
Dashboard /wp-admin3.31 ▲0.0144.34 ▼2.81
Posts /wp-admin/edit.php3.36 ▲0.0148.29 ▼2.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.40 ▼16.14
Media Library /wp-admin/upload.php3.24 ▲0.0135.59 ▲5.07

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Digital Downloads - Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7214.74 ▲0.461.47 ▼0.3136.66 ▼14.10
Dashboard /wp-admin2,210 ▲224.84 ▼1.06107.41 ▲4.7538.33 ▼4.10
Posts /wp-admin/edit.php2,095 ▲32.04 ▲0.0142.56 ▲1.1236.30 ▲1.40
Add New Post /wp-admin/post-new.php1,541 ▲2723.11 ▲5.55637.71 ▼15.3165.72 ▼3.77
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.0992.22 ▼7.3042.98 ▼2.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-blocks/includes/class-taxonomies.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-blocks/includes/functions.php:455
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/edd-blocks/includes/class-shortcodes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-blocks/includes/blocks/downloads/index.php:151
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edd-blocks/includes/class-assets.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: edd-blocks, easy digital downloads blocks, easy digital downloads, edd blocks, editor...

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

"Easy Digital Downloads - Blocks" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
69 characters long description:
Display Downloads, Categories and Tags using the new WordPress editor

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
Good job! No executable or dangerous file extensions detected14,390 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JSON20011,840
PHP93616661,103
JavaScript15201107894
CSS3590280
Sass63837261
Markdown110012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity11.29
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes228.57%
Methods58
▷ Static methods35.17%
▷ Public methods4679.31%
▷ Protected methods712.07%
▷ Private methods58.62%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected