78% wpdm-gutenberg-blocks

Code Review | Gutenberg Blocks by WordPress Download Manager

WordPress plugin Gutenberg Blocks by WordPress Download Manager scored78%from 54 tests.

About plugin

  • Plugin page: wpdm-gutenberg-bl...
  • Plugin version: 2.2.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 8, 2018
  • Latest release: Nov 17, 2023
  • Number of updates: 74
  • Update frequency: every 25.6 days
  • Top authors: codename065 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

7,000+ active /139,046 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.76ms] Passed 4 tests

Server-side resources used by Gutenberg Blocks by WordPress Download Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.08 ▼4.89
Dashboard /wp-admin3.33 ▲0.0348.68 ▼1.62
Posts /wp-admin/edit.php3.38 ▲0.0341.31 ▼5.92
Add New Post /wp-admin/post-new.php5.91 ▲0.03103.82 ▲11.77
Media Library /wp-admin/upload.php3.26 ▲0.0232.06 ▲1.41

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Gutenberg Blocks by WordPress Download Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.04 ▼0.311.75 ▲0.0838.31 ▼0.05
Dashboard /wp-admin2,195 ▲185.63 ▼0.0387.21 ▼7.2240.48 ▼3.83
Posts /wp-admin/edit.php2,103 ▲62.01 ▲0.0137.03 ▲0.9832.25 ▼6.05
Add New Post /wp-admin/post-new.php1,531 ▲522.98 ▲0.16617.95 ▼37.5561.52 ▲14.94
Media Library /wp-admin/upload.php1,400 ▲64.16 ▼0.0295.55 ▼2.1841.80 ▼1.69

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpdm-gutenberg-blocks/libs/blocks/tpls/card-slider.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: colorrgb in wp-content/plugins/wpdm-gutenberg-blocks/libs/blocks/tpls/card-slider.php on line 36
    • > PHP Notice
      Undefined variable: color in wp-content/plugins/wpdm-gutenberg-blocks/libs/blocks/tpls/card-slider.php on line 35
    • > PHP Notice
      Undefined variable: slides in wp-content/plugins/wpdm-gutenberg-blocks/libs/blocks/tpls/card-slider.php on line 10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wpdm-gutenberg-blocks/libs/blocks/tpls/card-slider.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPDM\\Block\\libs\\add_action() in wp-content/plugins/wpdm-gutenberg-blocks/libs/RestAPI.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPDM\\Block\\plugins_url() in wp-content/plugins/wpdm-gutenberg-blocks/wpdm-gutenberg-blocks.php:20

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Requires at least: Version not formatted correctly
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

wpdm-gutenberg-blocks/wpdm-gutenberg-blocks.php Passed 13 tests

The main PHP script in "Gutenberg Blocks by WordPress Download Manager" version 2.2.3 is automatically included on every request by WordPress
47 characters long description:
Gutenberg Blocks for WordPress Download Manager

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,342 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP273941622,339
CSS2002
JavaScript1001

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity18.75
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods73
▷ Static methods00.00%
▷ Public methods73100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin