78% sticky-menu-or-anything-on-scroll

Code Review | Sticky Menu & Sticky Header

WordPress plugin Sticky Menu & Sticky Header scored78%from 54 tests.

About plugin

  • Plugin page: sticky-menu-or-an...
  • Plugin version: 2.32
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Sep 19, 2014
  • Latest release: Aug 10, 2023
  • Number of updates: 128
  • Update frequency: every 25.4 days
  • Top authors: senff (62.5%)WebFactory (38.28%)

Code review

54 tests

User reviews

663 reviews

Install metrics

100,000+ active /1,452,968 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Sticky Menu & Sticky Header
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.96 ▲2.45
Dashboard /wp-admin3.33 ▼0.0247.81 ▼14.35
Posts /wp-admin/edit.php3.38 ▲0.0244.49 ▼5.40
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.80 ▼15.11
Media Library /wp-admin/upload.php3.25 ▲0.0230.90 ▼9.01
Sticky Menu (or Anything!) /wp-admin/options-general.php?page=stickyanythingmenu3.3839.30

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Sticky Menu & Sticky Header
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20313.86 ▼0.499.01 ▲7.4133.14 ▼10.48
Dashboard /wp-admin2,244 ▲675.78 ▲0.12100.94 ▼0.6642.59 ▼2.55
Posts /wp-admin/edit.php2,149 ▲492.28 ▲0.2743.00 ▲9.4836.91 ▲2.63
Add New Post /wp-admin/post-new.php1,534 ▼323.16 ▲4.84670.42 ▲52.0056.72 ▼14.07
Media Library /wp-admin/upload.php1,449 ▲524.35 ▲0.19100.65 ▲0.1442.53 ▼2.51
Sticky Menu (or Anything!) /wp-admin/options-general.php?page=stickyanythingmenu2,0862.6961.45151.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/sticky-menu-or-anything-on-scroll/sticky-menu-or-anything.php
  • 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/sticky-menu-or-anything-on-scroll/assets/sidebar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sticky_wp_kses_wf() in wp-content/plugins/sticky-menu-or-anything-on-scroll/assets/faq.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: header, floating menu, sticky header, menu, sticky menu...

sticky-menu-or-anything-on-scroll/sticky-menu-or-anything.php 85% from 13 tests

The primary PHP file in "Sticky Menu & Sticky Header" version 2.32 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("sticky-menu-or-anything-on-scroll.php" instead of "sticky-menu-or-anything.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 178 characters long)

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
Everything looks great! No dangerous files found in this plugin2,197 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP7252951,125
CSS2985547
JavaScript67786525

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1890.00%
▷ Anonymous functions210.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wf-flyout/icons/wp-reset.png3.11KB2.28KB▼ 26.85%
wf-flyout/icons/301-logo.png6.33KB3.09KB▼ 51.22%
assets/img/wp-sticky-pro.png10.23KB4.54KB▼ 55.64%
wf-flyout/icons/ucp.png16.30KB2.35KB▼ 85.58%
wf-flyout/icons/wp-ssl.png13.01KB6.69KB▼ 48.56%