84% advanced-sidebar-nav

Code Review | Advanced Sidebar Nav

WordPress plugin Advanced Sidebar Nav scored84%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: 6.3.1
  • 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 /778 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.71ms] Passed 4 tests

Analyzing server-side resources used by Advanced Sidebar Nav
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.84 ▼5.24
Dashboard /wp-admin3.34 ▲0.0461.80 ▲4.32
Posts /wp-admin/edit.php3.46 ▲0.1052.43 ▲2.97
Add New Post /wp-admin/post-new.php5.92 ▲0.04113.14 ▲3.40
Media Library /wp-admin/upload.php3.27 ▲0.0436.69 ▲1.70

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_advanced_sidebar_nav_widget
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Advanced Sidebar Nav: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.67 ▼1.081.71 ▼0.3544.30 ▲0.96
Dashboard /wp-admin2,206 ▲184.87 ▼0.0397.12 ▼23.0137.90 ▼9.70
Posts /wp-admin/edit.php2,089 ▼32.17 ▲0.1136.12 ▼4.5635.22 ▲0.08
Add New Post /wp-admin/post-new.php1,538 ▲2423.18 ▲5.64656.59 ▲35.3862.35 ▲8.88
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0393.23 ▼1.7341.23 ▼0.53

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_advanced_sidebar_nav_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: widget menu, sidebar nav, sidebar menu

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

The main PHP file in "Advanced Sidebar Nav" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
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 | An overview of files in this plugin; executable files are not allowed
There were no executable 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

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin