84% advanced-sidebar-nav

Code Review | Advanced Sidebar Nav

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

About plugin

  • Plugin page: advanced-sidebar-nav
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.2
  • WordPress version: 5.9.2
  • First release: Mar 13, 2019
  • Latest release: Nov 14, 2021
  • Number of updates: 3
  • Update frequency: every 325.7 days
  • Top authors: nazsabuz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 511 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼291.77ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Sidebar Nav
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0263.68 ▲8.15
Dashboard /wp-admin3.42 ▲0.0136.88 ▲3.07
Posts /wp-admin/edit.php3.65 ▲0.0142.06 ▲1.41
Add New Post /wp-admin/post-new.php6.89 ▼0.0899.95 ▼1,167.51
Media Library /wp-admin/upload.php3.30 ▲0.0124.80 ▼4.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
widget_advanced_sidebar_nav_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Sidebar Nav
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2915.78 ▲0.175.69 ▼1.022.20 ▼0.66
Dashboard /wp-admin2,895 ▲376.15 ▼0.18117.56 ▼17.94167.69 ▼3.55
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.0064.98 ▼0.10139.91 ▼5.00
Add New Post /wp-admin/post-new.php1,661 ▼9116.08 ▼5.50435.04 ▼24.68158.94 ▼2.70
Media Library /wp-admin/upload.php1,698 ▼35.44 ▼0.04136.42 ▼10.31188.03 ▼0.11

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
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_advanced_sidebar_nav_widget

Smoke tests 75% from 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 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-sidebar-nav/advanced-sidebar-nav.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-sidebar-nav/inc/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: sidebar menu, sidebar nav, widget menu

advanced-sidebar-nav/advanced-sidebar-nav.php Passed 13 tests

"Advanced Sidebar Nav" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
78 characters long description:
The best way to display navigation menus on sidebar, no matter how many depth!

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
Everything looks great! No dangerous files found in this plugin521 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP44918221
Sass1242140
CSS1241122
JavaScript13538

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods14
▷ Static methods642.86%
▷ Public methods1285.71%
▷ Protected methods214.29%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin