78% sticky-header-on-scroll

Code Review | Sticky Header On Scroll

WordPress plugin Sticky Header On Scroll scored78%from 54 tests.

About plugin

  • Plugin page: sticky-header-on-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Jun 3, 2021
  • Latest release: Feb 18, 2022
  • Number of updates: 4
  • Update frequency: every 65.3 days
  • Top authors: hardikchavada (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /2,960 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.02ms] Passed 4 tests

An overview of server-side resources used by Sticky Header On Scroll
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.05 ▲7.34
Dashboard /wp-admin3.37 ▲0.0650.17 ▲3.40
Posts /wp-admin/edit.php3.48 ▲0.1244.91 ▼4.59
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.84 ▼17.24
Media Library /wp-admin/upload.php3.29 ▲0.0635.05 ▼1.63

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

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

Browser metrics Passed 4 tests

Sticky Header On Scroll: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲18313.66 ▼0.607.07 ▲4.9441.58 ▼1.55
Dashboard /wp-admin2,225 ▲394.85 ▼0.15112.19 ▼14.1045.18 ▼0.21
Posts /wp-admin/edit.php2,111 ▲192.02 ▲0.0634.83 ▼4.0633.23 ▼4.15
Add New Post /wp-admin/post-new.php1,532 ▼122.81 ▼0.30660.04 ▼35.2854.04 ▼5.09
Media Library /wp-admin/upload.php1,410 ▲224.21 ▼0.0594.16 ▼12.1241.01 ▼2.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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

SRP 0% 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 fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/sticky-header-on-scroll/public/partials/sticky-header-on-scroll-public-display.php
    • > /wp-content/plugins/sticky-header-on-scroll/public/partials/scroll-to-top.php
    • > /wp-content/plugins/sticky-header-on-scroll/admin/partials/sticky-header-on-scroll-admin-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/sticky-header-on-scroll/admin/partials/insert-sticky-id.php:5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sticky-header-on-scroll/admin/partials/insert-sticky-id.php on line 3

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Screenshot-1.PNG), #2 (Screenshot-2.PNG), #3 (Screenshot-3.PNG)
The official readme.txt is a good inspiration

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

This is the main PHP file of "Sticky Header On Scroll" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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 plugin423 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14173556299
CSS3191478
JavaScript2436046

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.71
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin