89% hidedisable-any-widget-temporarily

Code Review | Hide(disable) any Widget temporarily

WordPress plugin Hide(disable) any Widget temporarily scored89%from 54 tests.

About plugin

  • Plugin page: hidedisable-any-w...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.2
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: Sep 17, 2018
  • Number of updates: 7
  • Update frequency: every 175.0 days
  • Top authors: tazotodua (57.14%)selnomeria (57.14%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /929 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 gracefully, with no errors

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

An overview of server-side resources used by Hide(disable) any Widget temporarily
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.48 ▼3.92
Dashboard /wp-admin3.32 ▼0.0253.02 ▼12.55
Posts /wp-admin/edit.php3.37 ▲0.0255.69 ▼15.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0298.22 ▼52.53
Media Library /wp-admin/upload.php3.25 ▲0.0236.28 ▲0.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Hide(disable) any Widget temporarily
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.092.04 ▲0.3639.58 ▼1.84
Dashboard /wp-admin2,195 ▲185.58 ▼0.0288.73 ▲0.9137.36 ▼6.29
Posts /wp-admin/edit.php2,103 ▼11.97 ▼0.0440.92 ▼1.0937.49 ▼2.66
Add New Post /wp-admin/post-new.php1,545 ▼923.01 ▲4.41664.27 ▲45.4551.55 ▼8.00
Media Library /wp-admin/upload.php1,400 ▼34.26 ▲0.0898.22 ▼6.8044.70 ▼5.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (the option)
You can take inspiration from this readme.txt

hidedisable-any-widget-temporarily/index.php 85% from 13 tests

The entry point to "Hide(disable) any Widget temporarily" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hidedisable-any-widget-temporarily.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 352 characters long)

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
Good job! No executable or dangerous file extensions detected745 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2181115745

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity66.50
▷ Minimum class complexity8.00
▷ Maximum class complexity125.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods5998.33%
▷ Protected methods00.00%
▷ Private methods11.67%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.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
There are no PNG files in this plugin