84% sticky-bar

Code Review | Sticky Bar

WordPress plugin Sticky Bar scored84%from 54 tests.

About plugin

  • Plugin page: sticky-bar
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 15, 2018
  • Latest release: Sep 15, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: wpati (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /780 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.01MB] [CPU: ▼14.95ms] Passed 4 tests

An overview of server-side resources used by Sticky Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0624.32 ▼15.90
Dashboard /wp-admin3.32 ▼0.0247.35 ▼11.33
Posts /wp-admin/edit.php3.37 ▲0.0243.31 ▼8.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.50 ▼24.41
Media Library /wp-admin/upload.php3.24 ▲0.0232.34 ▼0.01

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Sticky Bar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼0.771.75 ▼0.1043.22 ▲0.01
Dashboard /wp-admin2,203 ▲155.82 ▼0.0993.94 ▼7.0535.97 ▼9.89
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0137.39 ▼3.6631.54 ▼4.54
Add New Post /wp-admin/post-new.php1,533 ▼023.33 ▲0.13597.87 ▼79.8346.37 ▼7.09
Media Library /wp-admin/upload.php1,382 ▼64.13 ▼0.09100.81 ▲5.6442.31 ▼0.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/sticky-bar/customizer/content.php on line 3
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/sticky-bar/customizer/colors.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/sticky-bar/customizer/content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/sticky-bar/customizer/animations.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/sticky-bar/inc/render.php:30
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/sticky-bar/customizer/display.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sticky-bar/customizer/add_customize_options.php:41
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_setting() on null in wp-content/plugins/sticky-bar/customizer/colors.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/sticky-bar/sticky-bar.php:13
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/sticky-bar/customizer/animations.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: sticky-bar, notification, customizer, bar

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

The principal PHP file in "Sticky Bar" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin490 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP96422378
JavaScript27670
CSS17442

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.10
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%
Functions10
▷ Named functions10100.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
No PNG images were found in this plugin