84% sticky-header

Code Review | Sticky Header by ThematoSoup

WordPress plugin Sticky Header by ThematoSoup scored 84% from 54 tests.

About plugin

  • Plugin page: sticky-header
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Oct 19, 2013
  • Latest release: Sep 14, 2015
  • Number of updates: 16
  • Update frequency: every 43.5 days
  • Top authors: slobodanmanic (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

2,000+ active / 79,524 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.16ms] Passed 4 tests

A check of server-side resources used by Sticky Header by ThematoSoup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.16 ▼2.95
Dashboard /wp-admin3.35 ▲0.0544.53 ▼6.96
Posts /wp-admin/edit.php3.40 ▲0.0548.05 ▲0.94
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.02 ▼22.11
Media Library /wp-admin/upload.php3.28 ▲0.0535.40 ▼0.63

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

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

Browser metrics Passed 4 tests

Sticky Header by ThematoSoup: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,011 ▲27613.79 ▼0.527.99 ▲6.2443.64 ▼0.78
Dashboard /wp-admin2,260 ▲725.93 ▲0.03104.25 ▼2.5338.66 ▼9.83
Posts /wp-admin/edit.php2,146 ▲572.31 ▲0.2645.80 ▲8.2434.68 ▲1.05
Add New Post /wp-admin/post-new.php1,537 ▲423.08 ▼0.20653.83 ▲33.9155.17 ▼3.76
Media Library /wp-admin/upload.php1,445 ▲574.39 ▲0.19100.70 ▲4.0641.49 ▲1.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-header/sticky-header-settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sticky-header/views/public.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Sticky header in action), #2 (Sticky Header Customizer options)
You can take inspiration from this readme.txt

sticky-header/sticky-header.php 92% from 13 tests

The principal PHP file in "Sticky Header by ThematoSoup" v. 1.2.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin411 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP653192343
CSS20148
JavaScript23320

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png14.00KB6.41KB▼ 54.22%
screenshot-1.png51.51KB21.38KB▼ 58.50%