84% advanced-sidebar-menu

Code Review | Advanced Sidebar Menu

WordPress plugin Advanced Sidebar Menu scored 84% from 54 tests.

About plugin

  • Plugin page: advanced-sidebar-...
  • Plugin version: 8.7.3
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9.2
  • WordPress version: 5.9.2
  • First release: Oct 9, 2011
  • Latest release: Mar 21, 2022
  • Number of updates: 339
  • Update frequency: every 11.3 days
  • Top authors: Mat Lipe (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

20,000+ active / 927,702 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼323.56ms] Passed 4 tests

A check of server-side resources used by Advanced Sidebar Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.3654.00 ▲3.80
Dashboard /wp-admin3.71 ▲0.3038.55 ▲3.42
Posts /wp-admin/edit.php3.94 ▲0.3038.18 ▼0.02
Add New Post /wp-admin/post-new.php7.25 ▲0.2898.33 ▼1,293.51
Media Library /wp-admin/upload.php3.66 ▲0.3627.16 ▼4.14

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Sidebar Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,799 ▲5516.01 ▲0.236.37 ▼0.272.76 ▲0.67
Dashboard /wp-admin2,897 ▲436.14 ▼0.02114.69 ▼16.89153.28 ▼6.48
Posts /wp-admin/edit.php2,662 ▼323.36 ▼0.0062.33 ▲0.91139.71 ▲3.59
Add New Post /wp-admin/post-new.php1,756 ▼221.60 ▼0.25455.12 ▼12.57157.47 ▼1.24
Media Library /wp-admin/upload.php1,701 ▲35.53 ▲0.07142.38 ▼6.92185.54 ▼5.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • widget_advanced_sidebar_menu_category
    • widget_advanced_sidebar_menu

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/advanced-sidebar-menu/src/Walkers/Category_Walker.php:10
    • > PHP Fatal error
      Trait 'Advanced_Sidebar_Menu\\Traits\\Singleton' not found in wp-content/plugins/advanced-sidebar-menu/src/Cache.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_Sidebar_Menu\\Menus\\Page' not found in wp-content/plugins/advanced-sidebar-menu/views/page_list.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_Sidebar_Menu\\Menus\\Menu_Abstract' not found in wp-content/plugins/advanced-sidebar-menu/src/Menus/Page.php:14
    • > PHP Fatal error
      Trait 'Advanced_Sidebar_Menu\\Traits\\Singleton' not found in wp-content/plugins/advanced-sidebar-menu/src/Utils.php on line 13
    • > PHP Fatal error
      Trait 'Advanced_Sidebar_Menu\\Traits\\Singleton' not found in wp-content/plugins/advanced-sidebar-menu/src/Scripts.php on line 13
    • > PHP Fatal error
      Trait 'Advanced_Sidebar_Menu\\Traits\\Singleton' not found in wp-content/plugins/advanced-sidebar-menu/src/Notice.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_Sidebar_Menu\\Widget\\Widget_Abstract' not found in wp-content/plugins/advanced-sidebar-menu/src/Widget/Page.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_Sidebar_Menu\\Menus\\Menu_Abstract' not found in wp-content/plugins/advanced-sidebar-menu/src/Menus/Category.php:14
    • > PHP Fatal error
      Trait 'Advanced_Sidebar_Menu\\Traits\\Singleton' not found in wp-content/plugins/advanced-sidebar-menu/src/Core.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% 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: You can look at the official readme.txt

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

The primary PHP file in "Advanced Sidebar Menu" version 8.7.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.2.0" instead of "5.2")

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 detected2,273 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PO File3123203352

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.12
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
▷ Static methods65.17%
▷ Public methods10590.52%
▷ Protected methods108.62%
▷ Private methods10.86%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants49.52%
▷ Class constants3890.48%
▷ Public constants38100.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 files were detected