78% awesome-sticky-header

Code Review | Awesome Sticky Header by DevCanyon

WordPress plugin Awesome Sticky Header by DevCanyon scored78%from 54 tests.

About plugin

  • Plugin page: awesome-sticky-he...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Jul 14, 2015
  • Latest release: Nov 1, 2015
  • Number of updates: 24
  • Update frequency: every 4.6 days
  • Top authors: markzero (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

400+ active /28,685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Awesome Sticky Header by DevCanyon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.95 ▼0.39
Dashboard /wp-admin3.37 ▲0.0353.71 ▼12.73
Posts /wp-admin/edit.php3.42 ▲0.0754.66 ▲2.02
Add New Post /wp-admin/post-new.php5.95 ▲0.0789.81 ▼3.78
Media Library /wp-admin/upload.php3.30 ▲0.0740.74 ▲4.70
Awesome Header /wp-admin/themes.php?page=awesome-header3.3039.17

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

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

Browser metrics Passed 4 tests

Awesome Sticky Header by DevCanyon: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,035 ▲28913.63 ▼0.7410.98 ▲9.1843.32 ▼1.76
Dashboard /wp-admin2,210 ▲225.02 ▲0.14116.48 ▼1.5141.54 ▼2.07
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0536.95 ▼2.2833.43 ▼2.32
Add New Post /wp-admin/post-new.php1,536 ▲823.20 ▲4.75661.71 ▲9.3664.72 ▲10.98
Media Library /wp-admin/upload.php1,395 ▲74.13 ▼0.23110.63 ▲4.3946.75 ▲3.32
Awesome Header /wp-admin/themes.php?page=awesome-header1,7143.6251.2354.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 | 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
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/awesome-sticky-header/lib/css-live.php on line 92
    • > PHP Fatal error
      Uncaught Error: Class name must be a valid object or a string in wp-content/plugins/awesome-sticky-header/lib/css-util.php:96
    • > PHP Notice
      Trying to get property 'settings' of non-object in wp-content/plugins/awesome-sticky-header/lib/css-live.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/awesome-sticky-header/lib/css-live.php on line 19
    • > PHP Notice
      Trying to get property 'customizer' of non-object in wp-content/plugins/awesome-sticky-header/lib/css-live.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/awesome-sticky-header/lib/css-live.php on line 42
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/awesome-sticky-header/lib/css-live.php on line 34
    • > PHP Notice
      Trying to get property 'customizer' of non-object in wp-content/plugins/awesome-sticky-header/lib/css-util.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class name must be a valid object or a string in wp-content/plugins/awesome-sticky-header/lib/css-live.php:118
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/awesome-sticky-header/lib/utils.php:89

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/themes.php?page=awesome-header
    • > Network (severe)
    asmh/styles/preview?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/themes.php?page=awesome-header
    • > Network (severe)
    https://s3-us-west-1.amazonaws.com/awesomeheader/banner-image-11.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: sticky menu, fixed header, header admin control, header options, sticky header...

awesome-sticky-header/awesomeheader.php 85% from 13 tests

Analyzing the main PHP file in "Awesome Sticky Header by DevCanyon" version 1.0.4
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-sticky-header.php" instead of "awesomeheader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected4,902 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP11681813,414
JavaScript4309431,366
CSS5122476
JSON10024
SVG21022

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity20.80
▷ Minimum class complexity9.00
▷ Maximum class complexity45.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods87
▷ Static methods1416.09%
▷ Public methods8294.25%
▷ Protected methods00.00%
▷ Private methods55.75%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
16 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery-ui/images/ui-bg_glass_35_dddddd_1x400.png0.26KB0.13KB▼ 49.24%
assets/css/jquery-ui/images/ui-bg_flat_55_eeeeee_40x100.png0.21KB0.08KB▼ 60.45%
assets/css/jquery-ui/images/ui-icons_999999_256x240.png6.82KB4.17KB▼ 38.81%
assets/css/jquery-ui/images/ui-bg_inset-soft_50_c9c9c9_1x100.png0.27KB0.16KB▼ 40.93%
assets/css/jquery-ui/images/ui-bg_glass_100_f8f8f8_1x400.png0.26KB0.11KB▼ 55.34%