78% simple-bar

Code Review | Notification Bar

WordPress plugin Notification Bar scored78%from 54 tests.

About plugin

  • Plugin page: simple-bar
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4+
  • WordPress version: 6.3.1
  • First release: Jan 18, 2014
  • Latest release: May 13, 2016
  • Number of updates: 114
  • Update frequency: every 7.4 days
  • Top authors: umarbajwa (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

70+ active /7,874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Notification Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0359.46 ▲11.63
Dashboard /wp-admin3.33 ▲0.0354.13 ▼0.12
Posts /wp-admin/edit.php3.38 ▲0.0355.11 ▲0.61
Add New Post /wp-admin/post-new.php5.93 ▲0.0599.24 ▼11.64
Media Library /wp-admin/upload.php3.26 ▲0.0338.84 ▲1.58
Subscribers-List /wp-admin/admin.php?page=ssb_list3.2436.32
MailChimp Settings /wp-admin/admin.php?page=ssb_mailchimp3.2235.66
Settings /wp-admin/admin.php?page=ssb_bar_plugin_ui3.2638.34
Ultimate Bar /wp-admin/admin.php?page=ssb_bar3.2235.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Notification Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲20713.59 ▼0.717.41 ▲5.4447.84 ▲5.43
Dashboard /wp-admin2,250 ▲595.88 ▲1.02101.87 ▼4.4443.17 ▼0.91
Posts /wp-admin/edit.php2,130 ▲412.04 ▼0.0240.80 ▼1.4136.92 ▲1.67
Add New Post /wp-admin/post-new.php1,548 ▲2922.95 ▼0.40613.91 ▼20.1135.90 ▼12.69
Media Library /wp-admin/upload.php1,432 ▲414.28 ▲0.11101.10 ▼1.0242.83 ▼3.68
Subscribers-List /wp-admin/admin.php?page=ssb_list8041.7326.4725.39
MailChimp Settings /wp-admin/admin.php?page=ssb_mailchimp8231.7226.0629.62
Settings /wp-admin/admin.php?page=ssb_bar_plugin_ui1,7286.29132.28111.27
Ultimate Bar /wp-admin/admin.php?page=ssb_bar9261.8726.8634.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-bar/ssb_bar_style.php
    • > /wp-content/plugins/simple-bar/data/subscribe_msg.php
    • > /wp-content/plugins/simple-bar/subscriber-list-empty.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-bar/ssb_bar_html.php:3
    • > PHP Notice
      Undefined index: ssb_data in wp-content/plugins/simple-bar/data/ssbdata.php on line 3
    • > PHP Notice
      Undefined variable: ssb_bar_position in wp-content/plugins/simple-bar/ssb_bar_style.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-bar/ssb_scripts_file.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-bar/ssb_options_file.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-bar/ssb_options_file.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-bar/ssb_menu_file.php:4
    • > PHP Notice
      Undefined variable: ssb_bar_text_fontFamily in wp-content/plugins/simple-bar/ssb_bar_style.php on line 47
    • > PHP Notice
      Undefined variable: ssb_background_color in wp-content/plugins/simple-bar/ssb_bar_style.php on line 9
    • > PHP Notice
      Undefined variable: ssb_bar_position in wp-content/plugins/simple-bar/ssb_bar_style.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
Please take inspiration from this readme.txt

simple-bar/Ultimate-Bar.php 92% from 13 tests

"Notification Bar" version 2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-bar.php" instead of "Ultimate-Bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,631 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP163512,0251,490
JavaScript3282294
HTML316047

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods111
▷ Static methods00.00%
▷ Public methods111100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 3.54MB with 1.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
close.png1.12KB0.87KB▼ 22.45%
imgs/ulp.png3,445.64KB1,909.24KB▼ 44.59%
imgs/ts.png2.04KB0.80KB▼ 60.57%
imgs/msf.png7.83KB7.83KB0.00%
imgs/psp.png172.58KB51.67KB▼ 70.06%