94% genesis-sticky-menu

Code Review | Genesis Sticky Menu

WordPress plugin Genesis Sticky Menu scored 94% from 54 tests.

About plugin

  • Plugin page: genesis-sticky-menu
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 5.9.2
  • First release: Jun 20, 2013
  • Latest release: Jun 20, 2013
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: iniyan (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

50+ active / 8,952 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼307.47ms] Passed 4 tests

Server-side resources used by Genesis Sticky Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0169.36 ▲13.57
Dashboard /wp-admin3.41 ▲0.0080.89 ▲33.43
Posts /wp-admin/edit.php3.64 ▲0.0044.92 ▲1.82
Add New Post /wp-admin/post-new.php6.88 ▼0.09104.98 ▼1,207.66
Media Library /wp-admin/upload.php3.29 ▲0.0027.64 ▼37.62

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Genesis Sticky Menu: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲1315.79 ▲0.587.00 ▲1.022.69 ▼0.28
Dashboard /wp-admin2,895 ▲456.14 ▼0.03117.81 ▼43.84158.85 ▼16.88
Posts /wp-admin/edit.php2,694 ▲33.24 ▲0.1665.73 ▲0.15199.08 ▲43.93
Add New Post /wp-admin/post-new.php1,785 ▲12419.43 ▼3.30399.25 ▼51.79153.64 ▼12.44
Media Library /wp-admin/upload.php1,698 ▼05.52 ▼0.00158.19 ▲11.04180.07 ▼15.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis_Admin_Boxes' not found in wp-content/plugins/genesis-sticky-menu/gsm-design.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-sticky-menu/gsm-style.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/genesis-sticky-menu/gsm.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: menu, navigation, genesis, sticky menu

genesis-sticky-menu/gsm.php 92% from 13 tests

"Genesis Sticky Menu" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("genesis-sticky-menu.php" instead of "gsm.php")

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 detected978 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript313536780
PHP316963178
CSS13011
HTML1309

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jscolor/hv.png2.80KB7.32KB0.00%
jscolor/hs.png2.62KB7.54KB0.00%