84% shiftnav-responsive-mobile-menu

Code Review | ShiftNav - Responsive Mobile Menu

WordPress plugin ShiftNav - Responsive Mobile Menu scored84%from 54 tests.

About plugin

  • Plugin page: shiftnav-responsi...
  • Plugin version: 1.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2014
  • Latest release: Sep 15, 2023
  • Number of updates: 62
  • Update frequency: every 56.2 days
  • Top authors: sevenspark (100%)

Code review

54 tests

User reviews

68 reviews

Install metrics

20,000+ active /329,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.19ms] Passed 4 tests

An overview of server-side resources used by ShiftNav - Responsive Mobile Menu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.89 ▲2.71
Dashboard /wp-admin3.48 ▲0.1748.19 ▼3.88
Posts /wp-admin/edit.php3.59 ▲0.2348.35 ▲0.63
Add New Post /wp-admin/post-new.php6.06 ▲0.1790.16 ▼6.36
Media Library /wp-admin/upload.php3.40 ▲0.1739.28 ▲0.86
ShiftNav /wp-admin/themes.php?page=shiftnav-settings3.4038.55

Server storage [IO: ▲2.60MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 58 new files
Database: no new tables, 9 new options
New WordPress options
shiftnav_shiftnav-main
shiftnav_general
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
shiftnav_togglebar

Browser metrics Passed 4 tests

Checking browser requirements for ShiftNav - Responsive Mobile Menu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,105 ▲31913.49 ▼0.8715.65 ▲13.5060.09 ▲14.38
Dashboard /wp-admin2,202 ▲255.57 ▼0.0586.42 ▼16.6837.90 ▼6.46
Posts /wp-admin/edit.php2,104 ▲71.97 ▼0.0538.58 ▲1.1735.46 ▲1.10
Add New Post /wp-admin/post-new.php1,538 ▲1018.01 ▼5.17608.65 ▼66.9271.68 ▲18.19
Media Library /wp-admin/upload.php1,398 ▼54.20 ▲0.0298.81 ▲0.6143.04 ▼3.43
ShiftNav /wp-admin/themes.php?page=shiftnav-settings2,0343.5875.48108.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • shiftnav_shiftnav-main
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • shiftnav_togglebar
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • shiftnav_general

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'SHIFTNAV_DIRcustomizer/customizer.styles.generator.php' (include_path='.:/usr/share/php') in wp-content/plugins/shiftnav-responsive-mobile-menu/customizer/customizer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shiftnav-responsive-mobile-menu/customizer/customizer.styles.manager.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shiftnav-responsive-mobile-menu/includes/functions.php:2
    • > PHP Warning
      require_once(SHIFTNAV_DIRcustomizer/customizer.styles.generator.php): failed to open stream: No such file or directory in wp-content/plugins/shiftnav-responsive-mobile-menu/customizer/customizer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/shiftnav-responsive-mobile-menu/includes/ShiftNavWalker.class.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shiftnav-responsive-mobile-menu/admin/settings.config.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shiftnav-responsive-mobile-menu/admin/settings.menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shiftnav-responsive-mobile-menu/admin/settings.config.php:6
    • > PHP Warning
      Use of undefined constant SHIFTNAV_DIR - assumed 'SHIFTNAV_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/shiftnav-responsive-mobile-menu/customizer/customizer.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

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
8 plugin tags: sidebar, responsive, off-canvas, navigation, slide...

shiftnav-responsive-mobile-menu/shiftnav-responsive-mobile-menu.php Passed 13 tests

The main PHP file in "ShiftNav - Responsive Mobile Menu" ver. 1.7.2 adds more information about the plugin and also serves as the entry point for this plugin
39 characters long description:
An off-canvas mobile menu for WordPress

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
There were no executable files found in this plugin13,927 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
CSS11129966,616
PHP139948442,756
SVG1002,671
JavaScript53382341,058
LESS119762809
JSON10017

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity31.17
▷ Minimum class complexity3.00
▷ Maximum class complexity83.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods58
▷ Static methods23.45%
▷ Public methods5594.83%
▷ Protected methods00.00%
▷ Private methods35.17%
Functions86
▷ Named functions8598.84%
▷ Anonymous functions11.16%
Constants15
▷ Global constants15100.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
No PNG files were detected