10% sidenav

Code Review | SideNav

WordPress plugin SideNav scored10%from 54 tests.

About plugin

  • Plugin page: sidenav
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2017
  • Latest release: Mar 16, 2023
  • Number of updates: 6
  • Update frequency: every 343.2 days
  • Top authors: tradesouthwest@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,382 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/sidenav/includes/sidenav-editor.php+81
    Trying to access array offset on value of type bool

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

A check of server-side resources used by SideNav
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.0742.23 ▼3.05
Dashboard /wp-admin3.62 ▼0.0248.76 ▼24.26
Posts /wp-admin/edit.php3.73 ▲0.0554.00 ▲0.71
Add New Post /wp-admin/post-new.php6.20 ▲0.05104.45 ▼8.17
Media Library /wp-admin/upload.php3.54 ▲0.0542.02 ▲4.50

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SideNav
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16413.38 ▼0.998.37 ▲6.5449.78 ▲4.97
Dashboard /wp-admin2,211 ▲345.66 ▲0.0590.10 ▲0.1940.55 ▼6.84
Posts /wp-admin/edit.php2,119 ▲192.01 ▲0.0139.78 ▼2.2035.71 ▼3.23
Add New Post /wp-admin/post-new.php1,540 ▲1423.37 ▲5.73626.06 ▼43.6552.23 ▼15.92
Media Library /wp-admin/upload.php1,419 ▲194.21 ▼0.0996.68 ▼6.4243.31 ▼1.74

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 did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sidenav/includes/sidenav-editor.php:81
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sidenav/includes/sidenav-adminpage.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: menu builder, pullout menu, menu, html, sidebar...

sidenav/sidenav.php Passed 13 tests

This is the main PHP file of "SideNav" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Slide-out navigation for pull-out left or right side slide out menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected403 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP599131302
CSS112694
JavaScript13127

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png26.34KB12.82KB▼ 51.35%
screenshot-1.png38.58KB16.11KB▼ 58.24%
screenshot-2.png39.71KB16.17KB▼ 59.27%