82% widget-options

Code Review | Widget Options - The #1 WordPress Widget Control Plugin

WordPress plugin Widget Options - The #1 WordPress Widget Control Plugin scored82%from 54 tests.

About plugin

  • Plugin page: widget-options
  • Plugin version: 3.9.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Aug 23, 2023
  • Number of updates: 117
  • Update frequency: every 23.5 days
  • Top authors: phpbits (35.04%)edbertguinto (34.19%)mej (22.22%)justhyre (9.4%)expresstech (2.56%)

Code review

54 tests

User reviews

1486 reviews

Install metrics

100,000+ active /2,667,301 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼5.97ms] Passed 4 tests

Server-side resources used by Widget Options - The #1 WordPress Widget Control Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2739.64 ▲1.13
Dashboard /wp-admin3.87 ▲0.5256.16 ▼7.36
Posts /wp-admin/edit.php3.98 ▲0.6246.42 ▲6.96
Add New Post /wp-admin/post-new.php6.47 ▲0.5883.96 ▼14.07
Media Library /wp-admin/upload.php3.79 ▲0.5636.45 ▼3.59
Widget Options /wp-admin/options-general.php?page=widgetopts_plugin_settings3.9937.19
Getting started with Widget Options /wp-admin/index.php?page=widget-opts-getting-started3.7633.25

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 104 new files
Database: no new tables, 22 new options
New WordPress options
widgetopts_tabmodule-visibility
widget_recent-posts
widget_recent-comments
widgetopts_tabmodule-settings
widget_theysaidso_widget
_widgetopts_default_registered_
widgetopts_global_all_pages
widgetopts_tabmodule-hide_title
widgetopts_removed_global_pages
widgetopts_tabmodule-devices
...

Browser metrics Passed 4 tests

A check of browser resources used by Widget Options - The #1 WordPress Widget Control Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.32 ▼1.151.77 ▲0.0845.96 ▲2.12
Dashboard /wp-admin2,221 ▲445.08 ▼0.5893.50 ▼2.8048.49 ▲4.73
Posts /wp-admin/edit.php2,126 ▲292.39 ▲0.3736.84 ▼0.7932.69 ▼7.68
Add New Post /wp-admin/post-new.php1,549 ▲1423.28 ▲5.13669.32 ▲31.8837.81 ▼23.65
Media Library /wp-admin/upload.php1,429 ▲294.61 ▲0.49101.06 ▼10.5942.97 ▼1.06
Widget Options /wp-admin/options-general.php?page=widgetopts_plugin_settings2,5592.1528.8644.08
Getting started with Widget Options /wp-admin/index.php?page=widget-opts-getting-started1,3716.4559.1652.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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
  • This plugin did not uninstall successfully, leaving 22 options in the database
    • theysaidso_admin_options
    • widgetopts_installDate
    • widgetopts_tabmodule-hide_title
    • _widgetopts_default_registered_
    • widgetopts_tabmodule-settings
    • widgetopts_global_categories
    • widgetopts_removed_global_pages
    • widgetopts_tabmodule-devices
    • widgetopts_tabmodule-classic_widgets_screen
    • widgetopts_tabmodule-visibility
    • ...

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Page' not found in wp-content/plugins/widget-options/includes/extras.php:139
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-options/includes/widgets/extras.php:100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-options/includes/admin/globals.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Widgets Visibility Options), #2 (Device Visibility Options), #3 (Widgets Custom Alignment), #4 (Widget CSS ID & Classes), #5 (Display Widget Logic), #6 (Pagebuilder by SiteOrigin Plugin Widget Options), #7 (Widget Importer & Exporter Feature), #8 (Beaver Builder Integration), #9 (Elementor Pagebuilder Integration), #10 (Advanced Custom Fields ( ACF ) Support)
  • Tags: Too many tags (28 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

widget-options/plugin.php 69% from 13 tests

The main PHP script in "Widget Options - The #1 WordPress Widget Control Plugin" version 3.9.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 237 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("widget-options.php" instead of "plugin.php")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected9,087 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP629181,4615,895
CSS765872,135
JavaScript1319195934
Sass231106
Markdown110017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity86.00
▷ Minimum class complexity6.00
▷ Maximum class complexity302.00
Average method complexity6.43
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods37
▷ Static methods25.41%
▷ Public methods3594.59%
▷ Protected methods00.00%
▷ Private methods25.41%
Functions103
▷ Named functions9996.12%
▷ Anonymous functions43.88%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.80MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png82.92KB41.30KB▼ 50.20%
assets/css/jqueryui/1.11.4/themes/ui-lightness/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
screenshot-7.png49.61KB19.80KB▼ 60.09%
screenshot-3.png70.00KB35.99KB▼ 48.59%
screenshot-8.png51.34KB23.38KB▼ 54.45%