90% disable-widgets

Code Review | Disable Widgets

WordPress plugin Disable Widgets scored 90% from 54 tests.

About plugin

  • Plugin page: disable-widgets
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Jul 9, 2012
  • Latest release: Apr 26, 2018
  • Number of updates: 14
  • Update frequency: every 151.3 days
  • Top authors: shazahm1@hotmail.com (78.57%)zaantar (28.57%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active / 3,469 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.03MB] [CPU: ▼6.80ms] Passed 4 tests

A check of server-side resources used by Disable Widgets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.61 ▲0.96
Dashboard /wp-admin3.34 ▲0.0344.84 ▼8.74
Posts /wp-admin/edit.php3.39 ▲0.0344.64 ▼5.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.03 ▼12.17
Media Library /wp-admin/upload.php3.26 ▲0.0335.75 ▼0.87
Disable Widgets /wp-admin/options-general.php?page=disable-widgets3.2333.57

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Disable Widgets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.65 ▼0.771.85 ▲0.2643.89 ▼5.51
Dashboard /wp-admin2,213 ▲255.90 ▲0.01109.02 ▼1.5241.69 ▼6.92
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0335.22 ▼2.6135.10 ▼0.73
Add New Post /wp-admin/post-new.php1,536 ▲1923.30 ▲5.70683.19 ▲27.7552.87 ▼10.54
Media Library /wp-admin/upload.php1,386 ▼24.17 ▼0.0596.50 ▼10.7441.57 ▼4.96
Disable Widgets /wp-admin/options-general.php?page=disable-widgets9352.0523.3927.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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
The SRP test was a success

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: admin, disable widgets, sidebar widgets, widgets

disable-widgets/disable-widgets.php 92% from 13 tests

The primary PHP file in "Disable Widgets" version 2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected109 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15638109

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected