72% shift8-full-navigation

Code Review | Shift8 Full Nav

WordPress plugin Shift8 Full Nav scored 72% from 54 tests.

About plugin

  • Plugin page: shift8-full-navig...
  • Plugin version: 1.67
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 3, 2016
  • Latest release: Sep 27, 2023
  • Number of updates: 97
  • Update frequency: every 26.6 days
  • Top authors: shift8 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active / 6,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.38ms] Passed 4 tests

A check of server-side resources used by Shift8 Full Nav
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1739.28 ▼6.13
Dashboard /wp-admin3.51 ▲0.2150.14 ▼0.62
Posts /wp-admin/edit.php3.62 ▲0.2650.64 ▲1.81
Add New Post /wp-admin/post-new.php6.08 ▲0.2086.38 ▼12.59
Media Library /wp-admin/upload.php3.41 ▲0.1838.99 ▲7.20
Full Nav Settings /wp-admin/admin.php?page=shift8-full-navigation/components/settings.php/custom3.3732.77
Shift8 /wp-admin/admin.php?page=shift8-settings3.4038.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Shift8 Full Nav
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲25414.84 ▲0.441.67 ▲0.0641.47 ▼9.29
Dashboard /wp-admin2,395 ▲2076.65 ▲0.79127.65 ▲13.7838.86 ▼4.18
Posts /wp-admin/edit.php2,304 ▲2153.58 ▲1.5555.38 ▲17.9135.19 ▲1.32
Add New Post /wp-admin/post-new.php1,557 ▲2323.36 ▲0.22669.90 ▲23.4637.26 ▼15.64
Media Library /wp-admin/upload.php1,443 ▲584.35 ▲0.1082.38 ▼23.5043.35 ▼5.31
Full Nav Settings /wp-admin/admin.php?page=shift8-full-navigation/components/settings.php/custom2,9784.39117.8231.42
Shift8 /wp-admin/admin.php?page=shift8-settings9983.2840.2423.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=shift8-full-navigation/components/settings.php/custom
    • > Notice in wp-content/plugins/shift8-full-navigation/components/functions.php+257
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=shift8-full-navigation/components/settings.php/custom
    • > Notice in wp-content/plugins/shift8-full-navigation/shift8-fullnav.php+64
    Undefined variable: shift8_fullnav_menu

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/shift8-full-navigation/components/enqueuing.php:286
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/shift8-full-navigation/shift8-fullnav.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/shift8-full-navigation/components/functions.php:78

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shift8-settings
    • > Network (severe)
    wp-content/plugins/shift8-full-navigation//img/shift8pluginicon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

shift8-full-navigation/shift8-fullnav.php 92% from 13 tests

The principal PHP file in "Shift8 Full Nav" v. 1.67 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shift8-full-navigation.php" instead of "shift8-fullnav.php")

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 plugin17,532 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JSON10015,596
PHP49770819
JavaScript4302528703
CSS2268414

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity4.00
▷ Minimum method complexity2.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected