90% menu-based-sidebar

Code Review | Menu Based Sidebar

WordPress plugin Menu Based Sidebar scored90%from 54 tests.

About plugin

  • Plugin page: menu-based-sidebar
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 8, 2022
  • Latest release: Nov 20, 2023
  • Number of updates: 25
  • Update frequency: every 18.9 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,209 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.04ms] Passed 4 tests

Analyzing server-side resources used by Menu Based Sidebar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.99 ▼3.56
Dashboard /wp-admin3.33 ▲0.0348.20 ▲2.30
Posts /wp-admin/edit.php3.38 ▲0.0347.56 ▲0.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0374.63 ▼7.71
Media Library /wp-admin/upload.php3.26 ▲0.0335.80 ▲3.04

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Menu Based Sidebar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.22 ▼0.381.71 ▲0.0436.58 ▼8.36
Dashboard /wp-admin2,192 ▲185.65 ▲0.0194.21 ▼4.0943.83 ▲3.01
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0039.32 ▲1.1536.65 ▲1.02
Add New Post /wp-admin/post-new.php1,535 ▲925.06 ▲4.01612.65 ▼105.3375.75 ▲27.03
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.16102.91 ▼5.7941.63 ▼0.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: child menu items, dynamic menu, child pages, child menu, sidebar widget...

menu-based-sidebar/menu-based-sidebar.php Passed 13 tests

"Menu Based Sidebar" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Most popular plugin that give a smart way display menu in sidebar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin108 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24944108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity6.14
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected