84% simple-sticky-header-on-scroll

Code Review | Simple Sticky Header on Scroll

WordPress plugin Simple Sticky Header on Scroll scored84%from 54 tests.

About plugin

  • Plugin page: simple-sticky-hea...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Aug 5, 2022
  • Number of updates: 14
  • Update frequency: every 133.2 days
  • Top authors: BonfireThemes (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /32,545 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Simple Sticky Header on Scroll
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.03 ▼2.81
Dashboard /wp-admin3.31 ▲0.0144.05 ▼8.15
Posts /wp-admin/edit.php3.36 ▲0.0146.90 ▲2.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.42 ▼1.98
Media Library /wp-admin/upload.php3.23 ▲0.0032.86 ▼1.29

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Sticky Header on Scroll
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22013.68 ▼0.688.64 ▲6.8473.54 ▲37.25
Dashboard /wp-admin2,206 ▲185.84 ▼0.05104.88 ▲2.1538.48 ▼4.57
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0138.46 ▲2.6035.77 ▼0.29
Add New Post /wp-admin/post-new.php1,533 ▲1923.36 ▲5.67654.01 ▼4.4457.70 ▼5.01
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0293.07 ▼11.8442.94 ▼5.01

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-sticky-header-on-scroll/simple-sticky-header-on-scroll.php:192
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/simple-sticky-header-on-scroll/custom_controls.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: sticky header wordpress, header, floating, scroll

simple-sticky-header-on-scroll/simple-sticky-header-on-scroll.php Passed 13 tests

This is the main PHP file of "Simple Sticky Header on Scroll" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
128 characters long description:
A simple sticky on scroll header for WordPress. Customize under "Appearance > Customize > Simple Sticky Header on Scroll Plugin"

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin643 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS24049329
PHP26191290
JavaScript12813
SVG10011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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