83% sticky-headers

Code Review | Sticky Header

WordPress plugin Sticky Header scored83%from 54 tests.

About plugin

  • Plugin page: sticky-headers
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Aug 29, 2016
  • Number of updates: 12
  • Update frequency: every 18.2 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /10,370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.18ms] Passed 4 tests

This is a short check of server-side resources used by Sticky Header
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0628.04 ▼13.67
Dashboard /wp-admin3.32 ▲0.0245.01 ▼5.64
Posts /wp-admin/edit.php3.38 ▲0.0243.56 ▲0.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.55 ▼5.46
Media Library /wp-admin/upload.php3.25 ▲0.0236.47 ▲1.24
Sticky Headers /wp-admin/options-general.php?page=shds_sticky_header_settings3.2630.24

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

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

Browser metrics Passed 4 tests

Sticky Header: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲5314.24 ▲0.042.50 ▲0.4641.07 ▼8.11
Dashboard /wp-admin2,199 ▲255.64 ▼0.0388.35 ▼5.3441.70 ▼0.87
Posts /wp-admin/edit.php2,104 ▲11.98 ▲0.0139.66 ▲1.8836.12 ▲3.40
Add New Post /wp-admin/post-new.php1,529 ▲323.32 ▲0.40611.46 ▼22.8953.91 ▼1.95
Media Library /wp-admin/upload.php1,407 ▲104.22 ▲0.0496.82 ▼4.2843.70 ▼2.53
Sticky Headers /wp-admin/options-general.php?page=shds_sticky_header_settings9531.6927.3324.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • sticky_header_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sticky-headers/sticky_headers.php:19

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can take inspiration from this readme.txt

sticky-headers/sticky_headers.php 85% from 13 tests

The principal PHP file in "Sticky Header" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sticky-headers.php" instead of "sticky_headers.php")

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
Success! There were no dangerous files found in this plugin195 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2533194
JavaScript1121

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin