78% wp-widget-toggle

Code Review | WP Widget Toggle

WordPress plugin WP Widget Toggle scored78%from 54 tests.

About plugin

  • Plugin page: wp-widget-toggle
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Jan 18, 2014
  • Latest release: Jul 9, 2016
  • Number of updates: 8
  • Update frequency: every 113.5 days
  • Top authors: nickciske (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,341 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼12.35ms] Passed 4 tests

Server-side resources used by WP Widget Toggle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.68 ▲0.08
Dashboard /wp-admin3.32 ▼0.0244.91 ▼16.65
Posts /wp-admin/edit.php3.37 ▲0.0144.45 ▼6.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.52 ▼25.32
Media Library /wp-admin/upload.php3.24 ▲0.0134.53 ▼0.62
Widget Toggle /wp-admin/options-general.php?page=wpwt-options3.1828.94

Server storage [IO: ▲0.00MB] [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
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Widget Toggle
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.99 ▼0.636.50 ▲4.8740.82 ▲2.56
Dashboard /wp-admin2,210 ▲214.85 ▼1.1996.79 ▼11.5640.84 ▼0.71
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0334.44 ▼6.0834.25 ▼0.86
Add New Post /wp-admin/post-new.php1,545 ▲3118.22 ▲0.81610.09 ▼4.2648.26 ▲4.64
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0295.96 ▼2.6143.23 ▼0.38
Widget Toggle /wp-admin/options-general.php?page=wpwt-options8282.0624.2836.60

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpwt-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wpwt-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpwt-options
    • > Notice in wp-content/plugins/wp-widget-toggle/wp-widget-toggle.php+58
    Trying to access array offset on value of type bool

SRP 50% from 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-widget-toggle/wp-widget-toggle.php

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-widget-toggle === )
You can look at the official readme.txt

wp-widget-toggle/wp-widget-toggle.php Passed 13 tests

The main PHP file in "WP Widget Toggle" ver. 0.2 adds more information about the plugin and also serves as the entry point for this plugin
17 characters long description:
WP Widget Toggler

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected74 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1171248
JavaScript17426

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin