78% widget-menuizer

Code Review | Widget Menuizer

WordPress plugin Widget Menuizer scored78%from 54 tests.

About plugin

  • Plugin page: widget-menuizer
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-6.0
  • WordPress version: 6.3.1
  • First release: Sep 20, 2014
  • Latest release: Jun 7, 2022
  • Number of updates: 26
  • Update frequency: every 108.4 days
  • Top authors: drywallbmb (80.77%)kenjigarland (23.08%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /10,579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼2.59ms] Passed 4 tests

Server-side resources used by Widget Menuizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3744.99 ▲1.08
Dashboard /wp-admin3.67 ▲0.3753.02 ▼2.62
Posts /wp-admin/edit.php3.79 ▲0.4359.31 ▲0.56
Add New Post /wp-admin/post-new.php6.27 ▲0.3992.43 ▼9.36
Media Library /wp-admin/upload.php3.60 ▲0.3743.43 ▲7.48
Widget Menuizer /wp-admin/options-general.php?page=widget_menuizer3.5640.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widget Menuizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.121.54 ▼0.5237.61 ▼7.40
Dashboard /wp-admin2,196 ▲165.56 ▼0.0889.99 ▲2.7241.07 ▼2.78
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0037.83 ▼1.7837.85 ▼1.33
Add New Post /wp-admin/post-new.php1,540 ▲1418.11 ▼5.50639.21 ▼52.4869.46 ▲20.75
Media Library /wp-admin/upload.php1,401 ▲14.16 ▼0.03124.31 ▲18.1349.93 ▲3.88
Widget Menuizer /wp-admin/options-general.php?page=widget_menuizer8121.9929.0728.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 10× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/widget-menuizer/inc/classes/fields/class-cshp-field-select.php
    • > /wp-content/plugins/widget-menuizer/widget-menuizer.php
    • > /wp-content/plugins/widget-menuizer/inc/classes/fields/class-cshp-field-textarea.php
    • > /wp-content/plugins/widget-menuizer/inc/classes/fields/class-cshp-field-checkbox.php
    • > /wp-content/plugins/widget-menuizer/inc/classes/fields/class-cshp-field-number.php
    • > /wp-content/plugins/widget-menuizer/inc/classes/class-cshp-settings-page.php
    • > /wp-content/plugins/widget-menuizer/inc/classes/class-cshp-settings-section.php
    • > /wp-content/plugins/widget-menuizer/inc/classes/class-cshp-field.php
    • > /wp-content/plugins/widget-menuizer/views/admin/menu-settings.php
    • > /wp-content/plugins/widget-menuizer/inc/classes/class-cshp-settings-setting.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/nav-menu.php' (include_path='.:/usr/share/php') in wp-content/plugins/widget-menuizer/inc/classes/class-sidebar-walker-nav-menu-edit.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/widget-menuizer/inc/classes/class-sidebar-walker-nav-menu-edit.php on line 8
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/nav-menu.php): failed to open stream: No such file or directory in wp-content/plugins/widget-menuizer/inc/classes/class-sidebar-walker-nav-menu-edit.php on line 8

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === widget-menuizer === )
The official readme.txt might help

widget-menuizer/widget-menuizer.php Passed 13 tests

This is the main PHP file of "Widget Menuizer" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
57 characters long description:
Embed sidebar regions in your WordPress navigation menus.

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
No dangerous file extensions were detected948 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12100445813
JavaScript1112569
CSS34366

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.80
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods3191.18%
▷ Protected methods12.94%
▷ Private methods25.88%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin