78% sidebar-menu

Code Review | Sidebar Menu

WordPress plugin Sidebar Menu scored78%from 54 tests.

About plugin

  • Plugin page: sidebar-menu
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 8, 2022
  • Latest release: Nov 12, 2022
  • Number of updates: 9
  • Update frequency: every 4.8 days
  • Top authors: hoosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /519 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
Installer ran successfully

Server metrics [RAM: ▲1.34MB] [CPU: ▲7.07ms] Passed 4 tests

Analyzing server-side resources used by Sidebar Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3741.46 ▼1.51
Dashboard /wp-admin4.96 ▲1.6662.89 ▲12.15
Posts /wp-admin/edit.php5.01 ▲1.6564.58 ▲13.80
Add New Post /wp-admin/post-new.php7.58 ▲1.69107.31 ▲3.82
Media Library /wp-admin/upload.php4.88 ▲1.6664.15 ▲25.47
Settings /wp-admin/edit.php?post_type=sidebar-menu&page=sidebarmenu-settings4.8957.44
Sidebar Menu /wp-admin/edit.php?post_type=sidebar-menu4.9355.77
Add New /wp-admin/post-new.php?post_type=sidebar-menu4.9968.23

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 82 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
can_compress_scripts
option_tree
ot_media_post_ID
widget_recent-posts
widget_recent-comments
_sidebarmenu_settings
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Sidebar Menu: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8613.72 ▼0.501.62 ▼0.1746.77 ▲4.60
Dashboard /wp-admin2,223 ▲385.83 ▼0.02105.14 ▲0.2675.41 ▲29.94
Posts /wp-admin/edit.php2,124 ▲352.03 ▲0.0236.94 ▼0.3232.45 ▼2.65
Add New Post /wp-admin/post-new.php6,685 ▲5,16530.37 ▲7.181,015.06 ▲323.8647.76 ▼18.39
Media Library /wp-admin/upload.php1,414 ▲294.12 ▼0.05114.80 ▲10.1975.62 ▲29.66
Settings /wp-admin/edit.php?post_type=sidebar-menu&page=sidebarmenu-settings1,1104.4976.8668.02
Sidebar Menu /wp-admin/edit.php?post_type=sidebar-menu1,1142.2533.1130.64
Add New /wp-admin/post-new.php?post_type=sidebar-menu2,3635.11111.77107.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • _sidebarmenu_settings
    • widget_theysaidso_widget
    • option_tree
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • ot_media_post_ID
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 11× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/class-ot-meta-box.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/ot-functions-deprecated.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/class-ot-post-formats.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/class-ot-settings.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/ot-functions-settings-page.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/ot-functions-admin.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/ot-functions-option-types.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/ot-functions-docs-page.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/class-ot-cleanup.php
    • > /wp-content/plugins/sidebar-menu/includes/option-tree/includes/ot-functions-compat.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/sidebar-menu/includes/Classes/Description_Walker.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sidebar-menu/includes/plugin-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sidebar-menu/includes/meta-boxes.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: side navigation, bootstrap sidebar, sidebar, side navigation menu, sidebar menu...

sidebar-menu/sidebar-menu.php 92% from 13 tests

The main PHP script in "Sidebar Menu" version 1.0.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 250 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin27,948 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
CSS225,86134918,010
PHP202,9933,9518,326
JavaScript72291021,222
SVG200390

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity38.00
▷ Minimum class complexity2.00
▷ Maximum class complexity153.00
Average method complexity5.77
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods79
▷ Static methods78.86%
▷ Public methods7088.61%
▷ Protected methods00.00%
▷ Private methods911.39%
Functions189
▷ Named functions18296.30%
▷ Anonymous functions73.70%
Constants25
▷ Global constants25100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/option-tree/assets/images/layout/left-dual-sidebar.png3.83KB2.06KB▼ 46.34%
includes/option-tree/assets/images/layout/left-sidebar.png3.90KB2.09KB▼ 46.31%
includes/option-tree/assets/images/ot-select-hover.png1.02KB0.14KB▼ 85.92%
includes/option-tree/assets/images/layout/right-dual-sidebar.png3.86KB2.08KB▼ 46.18%
includes/option-tree/assets/images/ot-select.png1.03KB0.14KB▼ 86.03%