83% fixed-and-sticky-header

Code Review | Fixed And Sticky Header

WordPress plugin Fixed And Sticky Header scored83%from 54 tests.

About plugin

  • Plugin page: fixed-and-sticky-...
  • Plugin version: 1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Jan 17, 2017
  • Latest release: Apr 11, 2021
  • Number of updates: 26
  • Update frequency: every 59.3 days
  • Top authors: arjunthakur (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

3,000+ active /59,487 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.01MB] [CPU: ▼8.95ms] Passed 4 tests

Server-side resources used by Fixed And Sticky Header
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0625.33 ▼21.00
Dashboard /wp-admin3.32 ▼0.0249.52 ▼15.55
Posts /wp-admin/edit.php3.37 ▲0.0252.26 ▲2.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0296.53 ▲5.38
Media Library /wp-admin/upload.php3.24 ▲0.0235.71 ▼1.30
Fixed Header /wp-admin/options-general.php?page=myplugin_setting3.2229.88

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Fixed And Sticky Header
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲18013.68 ▼0.759.15 ▲7.1438.30 ▼6.71
Dashboard /wp-admin2,210 ▲254.83 ▼0.04109.48 ▼6.0640.87 ▼3.86
Posts /wp-admin/edit.php2,093 ▲71.99 ▼0.0539.40 ▲2.2434.72 ▼2.64
Add New Post /wp-admin/post-new.php1,548 ▲2818.30 ▼5.07639.89 ▼56.8957.57 ▼6.39
Media Library /wp-admin/upload.php1,383 ▼84.18 ▼0.0798.71 ▼4.7343.16 ▼2.01
Fixed Header /wp-admin/options-general.php?page=myplugin_setting8582.0327.6230.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • pluginoptions_fx
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just 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 get_option() in wp-content/plugins/fixed-and-sticky-header/dashboard-form.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

fixed-and-sticky-header/fixed_and_sticky_header.php 85% from 13 tests

Analyzing the main PHP file in "Fixed And Sticky Header" version 1.5
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("fixed-and-sticky-header.php" instead of "fixed_and_sticky_header.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected101 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21416101

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin