84% simple-sticky-header-menu

Code Review | Simple Sticky Header Menu

WordPress plugin Simple Sticky Header Menu scored84%from 54 tests.

About plugin

  • Plugin page: simple-sticky-hea...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.2
  • WordPress version: 6.3.1
  • First release: May 24, 2021
  • Latest release: Oct 12, 2022
  • Number of updates: 14
  • Update frequency: every 36.3 days
  • Top authors: jitendra742744 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.63ms] Passed 4 tests

An overview of server-side resources used by Simple Sticky Header Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.40 ▲4.34
Dashboard /wp-admin3.31 ▲0.0148.18 ▼1.80
Posts /wp-admin/edit.php3.36 ▲0.0150.16 ▲3.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.72 ▼14.04
Media Library /wp-admin/upload.php3.24 ▲0.0136.68 ▼2.28

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Sticky Header Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5214.28 ▲0.122.09 ▲0.5244.31 ▲1.76
Dashboard /wp-admin2,215 ▲355.58 ▼0.0782.01 ▼6.8779.60 ▲31.94
Posts /wp-admin/edit.php2,120 ▲201.97 ▼0.0438.26 ▲3.4034.54 ▼10.21
Add New Post /wp-admin/post-new.php1,694 ▲15721.02 ▲2.96665.01 ▲17.2152.52 ▼14.24
Media Library /wp-admin/upload.php1,417 ▲144.23 ▲0.06100.11 ▼6.6476.66 ▲29.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-sticky-header-menu/simple-sticky-header-menu.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: header sticky, sticky header, header fix, fixed header on scroll, simple stiky header...

simple-sticky-header-menu/simple-sticky-header-menu.php 85% from 13 tests

This is the main PHP file of "Simple Sticky Header Menu" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin149 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11513116
CSS23230
JavaScript1203

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions8
▷ Named functions8100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/sshm.png0.43KB0.43KB0.00%