83% disable-blocks-widget

Code Review | Disable Blocks Widget Sidebar.

WordPress plugin Disable Blocks Widget Sidebar. scored83%from 54 tests.

About plugin

  • Plugin page: disable-blocks-wi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: Jul 28, 2021
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: echocoder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /804 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Disable Blocks Widget Sidebar.
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.71 ▼0.17
Dashboard /wp-admin3.31 ▲0.0151.74 ▼0.37
Posts /wp-admin/edit.php3.36 ▲0.0155.23 ▲1.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.96 ▼17.54
Media Library /wp-admin/upload.php3.23 ▲0.0036.61 ▼4.27

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Disable Blocks Widget Sidebar.: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.38 ▲0.022.28 ▲0.6543.39 ▼0.07
Dashboard /wp-admin2,198 ▲215.61 ▲0.0186.00 ▼7.4339.32 ▼5.49
Posts /wp-admin/edit.php2,103 ▼01.98 ▲0.0139.49 ▼9.0835.37 ▼2.30
Add New Post /wp-admin/post-new.php1,526 ▼023.63 ▼0.11686.09 ▼6.9159.98 ▲5.71
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.00104.32 ▲1.1946.10 ▼0.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • 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
Even though everything seems fine, this is not 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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-blocks-widget/index.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 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
9 plugin tags: widgets, gutenberg, block widgets, classic widgets, post types...

disable-blocks-widget/index.php 77% from 13 tests

The principal PHP file in "Disable Blocks Widget Sidebar." v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("disable-blocks-widget.php" instead of "index.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.8" instead of "5.6.20")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13158

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin