72% fm-notification-bar

Code Review | Notification Bar - Top Bar - Easy Sticky Notification Bar | FM Notification Bar

WordPress plugin Notification Bar - Top Bar - Easy Sticky Notification Bar | FM Notification Bar scored72%from 54 tests.

About plugin

  • Plugin page: fm-notification-bar
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Jan 6, 2018
  • Latest release: Jan 13, 2021
  • Number of updates: 13
  • Update frequency: every 84.9 days
  • Top authors: freewebmentor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,727 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.19ms] Passed 4 tests

Server-side resources used by Notification Bar - Top Bar - Easy Sticky Notification Bar | FM Notification Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0725.50 ▼20.91
Dashboard /wp-admin3.32 ▲0.0250.62 ▲1.73
Posts /wp-admin/edit.php3.38 ▲0.0251.31 ▼0.00
Add New Post /wp-admin/post-new.php5.91 ▲0.02110.07 ▲13.58
Media Library /wp-admin/upload.php3.25 ▲0.0237.88 ▼1.58
Notification Bar /wp-admin/options-general.php?page=fm-notification-bar3.1931.39

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Notification Bar - Top Bar - Easy Sticky Notification Bar | FM Notification Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.74 ▲0.352.11 ▲0.2546.58 ▲4.57
Dashboard /wp-admin2,204 ▲305.60 ▲0.0893.36 ▼0.2343.34 ▲2.84
Posts /wp-admin/edit.php2,109 ▲92.00 ▼0.0342.94 ▲6.2836.43 ▼0.75
Add New Post /wp-admin/post-new.php1,531 ▲523.71 ▲0.48641.47 ▼51.6248.02 ▼22.36
Media Library /wp-admin/upload.php1,406 ▲64.19 ▼0.0698.07 ▼7.8441.84 ▼6.35
Notification Bar /wp-admin/options-general.php?page=fm-notification-bar8922.0324.6024.04

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fm-notification-bar
    • > Notice in wp-content/plugins/fm-notification-bar/admin/settings.php+69
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× 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/fm-notification-bar/admin/settings.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=fm-notification-bar
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=fm-notification-bar 189 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: floating bar, special offer bar, notification bar, notice, message...

fm-notification-bar/notification-bar.php 92% from 13 tests

The main PHP file in "Notification Bar - Top Bar - Easy Sticky Notification Bar | FM Notification Bar" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fm-notification-bar.php" instead of "notification-bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin263 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS2212146
PHP31616117

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png55.54KB16.67KB▼ 69.98%
screenshot-2.png86.98KB25.26KB▼ 70.96%
img/woo_16.png0.49KB0.43KB▼ 11.24%