84% sticky-banner

Code Review | Sticky banner

WordPress plugin Sticky banner scored84%from 54 tests.

About plugin

  • Plugin page: sticky-banner
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Mar 19, 2020
  • Latest release: Dec 30, 2020
  • Number of updates: 22
  • Update frequency: every 13.1 days
  • Top authors: hiddendepth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /5,494 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.04ms] Passed 4 tests

Server-side resources used by Sticky banner
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.29 ▲3.94
Dashboard /wp-admin3.34 ▲0.0049.89 ▼7.09
Posts /wp-admin/edit.php3.39 ▲0.0445.94 ▲1.08
Add New Post /wp-admin/post-new.php5.94 ▲0.0690.33 ▼4.86
Media Library /wp-admin/upload.php3.27 ▲0.0435.70 ▼1.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Sticky banner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲17713.85 ▼0.525.98 ▲4.3743.04 ▲4.51
Dashboard /wp-admin2,243 ▲525.11 ▼0.77114.55 ▲10.6244.57 ▲4.58
Posts /wp-admin/edit.php2,128 ▲392.33 ▲0.2736.42 ▼1.3129.67 ▼2.38
Add New Post /wp-admin/post-new.php1,543 ▲2917.86 ▲0.11688.79 ▲31.1737.78 ▼26.24
Media Library /wp-admin/upload.php1,428 ▲464.55 ▲0.3297.35 ▲2.2943.28 ▲0.09

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The following issues need your attention
  • 5× 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/sticky-banner/inc/admin/colours.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sticky-banner/inc/stickybanner.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-banner/inc/admin/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sticky-banner/hdsb-stickybanner.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-banner/inc/enqueues.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6 in sticky-banner/assets to your readme.txt
You can look at the official readme.txt

sticky-banner/hdsb-stickybanner.php 92% from 13 tests

This is the main PHP file of "Sticky banner" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sticky-banner.php" instead of "hdsb-stickybanner.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 detected525 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP53727267
Sass3191162
JavaScript1142660
SVG20034
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin