83% simple-notification-bar

Code Review | Simple Notification Bar

WordPress plugin Simple Notification Bar scored83%from 54 tests.

About plugin

  • Plugin page: simple-notificati...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jan 18, 2021
  • Latest release: Aug 24, 2021
  • Number of updates: 17
  • Update frequency: every 13.4 days
  • Top authors: sozgat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /413 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Simple Notification Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.79 ▼2.48
Dashboard /wp-admin3.34 ▲0.0446.72 ▲2.34
Posts /wp-admin/edit.php3.40 ▲0.0445.49 ▼3.36
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.46 ▼9.90
Media Library /wp-admin/upload.php3.27 ▲0.0436.59 ▲4.91

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Notification Bar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.09 ▼0.261.58 ▼0.0836.93 ▼2.35
Dashboard /wp-admin2,214 ▲435.58 ▲0.0180.56 ▼9.0537.13 ▼4.87
Posts /wp-admin/edit.php2,119 ▲162.01 ▲0.0134.65 ▲0.1631.66 ▼4.86
Add New Post /wp-admin/post-new.php1,539 ▲1123.19 ▲0.04655.51 ▼18.6761.79 ▲4.11
Media Library /wp-admin/upload.php1,419 ▲164.16 ▲0.0196.91 ▼2.7343.12 ▲1.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/simple-notification-bar/admin/views/simple-notification-bar-admin-template.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-notification-bar/simple-notification-bar.php:15

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === simple-notification-bar === )
  • Screenshots: Please a description for screenshot #3 in simple-notification-bar/assets to your readme.txt
The official readme.txt might help

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

The main PHP script in "Simple Notification Bar" version 1.0.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin206 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45530206

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.23MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot2.png130.91KB31.88KB▼ 75.65%
assets/screenshot3.png55.16KB9.30KB▼ 83.14%
assets/screenshot1.png46.23KB14.08KB▼ 69.55%