84% wp-sticky-header

Code Review | WP Sticky Header

WordPress plugin WP Sticky Header scored84%from 54 tests.

About plugin

  • Plugin page: wp-sticky-header
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2014
  • Latest release: Aug 16, 2019
  • Number of updates: 25
  • Update frequency: every 71.9 days
  • Top authors: wpnaga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /5,075 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.86ms] Passed 4 tests

A check of server-side resources used by WP Sticky Header
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.47 ▼3.90
Dashboard /wp-admin3.37 ▲0.0650.44 ▼2.35
Posts /wp-admin/edit.php3.42 ▲0.0650.26 ▼5.67
Add New Post /wp-admin/post-new.php5.96 ▲0.0787.27 ▼15.50
Media Library /wp-admin/upload.php3.29 ▲0.0636.91 ▼1.96

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 15 new options
New WordPress options
widget_recent-comments
wpsh_closable
wpsh_close_icon_color
theysaidso_admin_options
widget_theysaidso_widget
wpsh_where
wpsh_text_color
can_compress_scripts
wpsh_enable
widget_recent-posts
...

Browser metrics Passed 4 tests

WP Sticky Header: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲15513.56 ▼0.717.19 ▲5.2158.38 ▲13.11
Dashboard /wp-admin2,234 ▲575.78 ▲0.2486.52 ▼9.3489.89 ▲45.43
Posts /wp-admin/edit.php2,144 ▲442.28 ▲0.2444.11 ▲7.8836.39 ▲1.63
Add New Post /wp-admin/post-new.php1,557 ▲2923.04 ▼0.13805.07 ▲132.6937.66 ▼11.23
Media Library /wp-admin/upload.php1,427 ▲274.35 ▲0.16102.44 ▼2.3377.17 ▲30.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • wpsh_close_icon_color
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 1× 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/wp-sticky-header/wp-sticky-header.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: notification, content, sticky, top, header...

wp-sticky-header/wp-sticky-header.php Passed 13 tests

"WP Sticky Header" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
Plugin to display some content/notification on top of the webpage.

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
Good job! No executable or dangerous file extensions detected276 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP13915239
JavaScript44037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions12
▷ Named functions12100.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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.68KB0.86KB▼ 48.92%
images/help2.png15.12KB6.97KB▼ 53.92%
images/help1.png39.24KB16.03KB▼ 59.14%