84% disable-unused-block-editor-blocks

Code Review | Disable Unused Block Editor Blocks

WordPress plugin Disable Unused Block Editor Blocks scored84%from 54 tests.

About plugin

  • Plugin page: disable-unused-bl...
  • Plugin version: 5.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Jan 22, 2022
  • Latest release: Nov 18, 2023
  • Number of updates: 26
  • Update frequency: every 25.6 days
  • Top authors: kubiq (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /1,524 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.86ms] Passed 4 tests

Server-side resources used by Disable Unused Block Editor Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.47 ▼1.82
Dashboard /wp-admin3.37 ▲0.0347.82 ▼8.25
Posts /wp-admin/edit.php3.49 ▲0.1346.42 ▼2.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.12 ▼13.66
Media Library /wp-admin/upload.php3.30 ▲0.0734.55 ▼3.23

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Disable Unused Block Editor Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲714.34 ▼0.041.93 ▼0.1043.56 ▼0.76
Dashboard /wp-admin2,202 ▲225.64 ▲0.1085.90 ▼6.2443.21 ▲1.81
Posts /wp-admin/edit.php2,107 ▲71.95 ▼0.0737.80 ▼2.8034.56 ▼3.96
Add New Post /wp-admin/post-new.php1,529 ▲323.40 ▲0.30680.30 ▼92.0050.68 ▼12.07
Media Library /wp-admin/upload.php1,404 ▲104.22 ▲0.0298.27 ▼4.5941.44 ▼2.12
Disable Unused Blocks /wp-admin/disable-unused-block-editor-blocks.php260.410.1014.15

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/disable-unused-block-editor-blocks.php
    • > Network (severe)
    wp-admin/disable-unused-block-editor-blocks.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: The official readme.txt might help

disable-unused-block-editor-blocks/disable-unused-block-editor-blocks.php 92% from 13 tests

The main PHP file in "Disable Unused Block Editor Blocks" ver. 5.5 adds more information about the plugin and also serves as the entry point for this plugin
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

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
There were no executable files found in this plugin548 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14314232
JavaScript2243196
CSS140120

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.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
No PNG files were detected