10% notification-bar-on-footer

Code Review | Notification bar on footer

WordPress plugin Notification bar on footer scored10%from 54 tests.

About plugin

  • Plugin page: notification-bar-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: May 14, 2020
  • Latest release: Jan 31, 2022
  • Number of updates: 4
  • Update frequency: every 156.8 days
  • Top authors: ravisinghit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /503 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.98ms] Passed 4 tests

A check of server-side resources used by Notification bar on footer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0843.35 ▲2.33
Dashboard /wp-admin3.38 ▲0.0851.03 ▼7.11
Posts /wp-admin/edit.php3.50 ▲0.1452.76 ▲0.72
Add New Post /wp-admin/post-new.php5.99 ▲0.0988.40 ▼4.92
Media Library /wp-admin/upload.php3.31 ▲0.0734.14 ▼0.59
Footer Notification /wp-admin/options-general.php?page=notification-footer3.2832.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: 1 new table, 7 new options
New tables
wp_notification_bar_footer
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
nbof_db_version
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Notification bar on footer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.53 ▼0.879.17 ▲7.6844.15 ▼1.32
Dashboard /wp-admin2,225 ▲515.82 ▲0.1195.45 ▲6.1942.23 ▼3.33
Posts /wp-admin/edit.php2,129 ▲292.27 ▲0.2842.03 ▲0.1335.19 ▼7.52
Add New Post /wp-admin/post-new.php1,550 ▲2423.34 ▲0.05670.36 ▼30.1435.62 ▼10.66
Media Library /wp-admin/upload.php1,421 ▲214.51 ▲0.3699.83 ▼8.8146.39 ▲0.49
Footer Notification /wp-admin/options-general.php?page=notification-footer1,3862.5959.5726.93

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • nbof_db_version
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/notification-bar-on-footer/admin/partials/notification-bar-on-footer-admin-display.php
    • > /wp-content/plugins/notification-bar-on-footer/public/partials/notification-bar-on-footer-public-display.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Notification bar on footer === )
Please take inspiration from this readme.txt

notification-bar-on-footer/notification-bar-on-footer.php Passed 13 tests

The entry point to "Notification bar on footer" version 1.0.1 is a PHP file that has certain tags in its header comment area
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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
Good job! No executable or dangerous file extensions detected384 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12147561363
JavaScript375421
CSS2180

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.10
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected