68% ultimate-bar

Code Review | Top Bar

WordPress plugin Top Bar scored68%from 54 tests.

About plugin

  • Plugin page: ultimate-bar
  • Plugin version: 3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.8
  • WordPress version: 6.3.1
  • First release: Jun 20, 2015
  • Latest release: Dec 7, 2016
  • Number of updates: 96
  • Update frequency: every 8.9 days
  • Top authors: umarbajwa (92.71%)Zia Imtiaz (8.33%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /8,758 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.00ms] Passed 4 tests

A check of server-side resources used by Top Bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1248.47 ▼1.86
Dashboard /wp-admin3.41 ▲0.1055.90 ▲4.98
Posts /wp-admin/edit.php3.46 ▲0.1051.54 ▼4.06
Add New Post /wp-admin/post-new.php6.01 ▲0.1296.47 ▼1.81
Media Library /wp-admin/upload.php3.34 ▲0.1037.02 ▼0.28
MailChimp Settings /wp-admin/admin.php?page=ssb_mailchimp3.3034.99
Subscribers-List /wp-admin/admin.php?page=ssb_list3.3035.21
Settings /wp-admin/admin.php?page=ssb_bar_plugin_ui3.3438.43
Ultimate Bar /wp-admin/admin.php?page=ssb_bar3.3031.91

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 28 new files
Database: 1 new table, 7 new options
New tables
wp_ssb_data
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
jal_db_version
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Top Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲13113.54 ▼1.209.12 ▲7.1244.56 ▲0.38
Dashboard /wp-admin2,239 ▲655.66 ▼0.0393.96 ▼10.9340.50 ▼5.68
Posts /wp-admin/edit.php2,144 ▲412.02 ▼0.0141.06 ▼5.3136.89 ▼1.69
Add New Post /wp-admin/post-new.php1,560 ▲3423.19 ▼0.40673.73 ▼23.6138.05 ▼13.58
Media Library /wp-admin/upload.php1,441 ▲414.41 ▲0.1798.18 ▼18.0442.12 ▲0.41
MailChimp Settings /wp-admin/admin.php?page=ssb_mailchimp8351.8326.6030.57
Subscribers-List /wp-admin/admin.php?page=ssb_list9461.7125.2956.46
Settings /wp-admin/admin.php?page=ssb_bar_plugin_ui1,7346.17131.02117.42
Ultimate Bar /wp-admin/admin.php?page=ssb_bar9411.6526.8433.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_ssb_data
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • jal_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ultimate-bar/subscriber-list-empty.php
    • > /wp-content/plugins/ultimate-bar/ssb_bar_style.php
    • > /wp-content/plugins/ultimate-bar/data/subscribe_msg.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: ssb_bar_position in wp-content/plugins/ultimate-bar/ssb_bar_style.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ultimate-bar/ssb_bar_html.php:3
    • > PHP Notice
      Undefined variable: ssb_bar_text_size in wp-content/plugins/ultimate-bar/ssb_bar_style.php on line 52
    • > PHP Notice
      Undefined variable: ssb_bar_text_fontFamily in wp-content/plugins/ultimate-bar/ssb_bar_style.php on line 53
    • > PHP Notice
      Undefined variable: ssb_background_color in wp-content/plugins/ultimate-bar/ssb_bar_style.php on line 88
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-bar/ssb_menu_file.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ultimate-bar/ssb_options_file.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-bar/ssb_scripts_file.php:14
    • > PHP Notice
      Undefined variable: ssb_background_color in wp-content/plugins/ultimate-bar/ssb_bar_style.php on line 66
    • > PHP Warning
      readfile(data/sm_subcribers-list.csv): failed to open stream: No such file or directory in wp-content/plugins/ultimate-bar/subscriber-list-download.php on line 7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

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

The entry point to "Top Bar" version 3.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ultimate-bar.php" instead of "Ultimate-Bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,709 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP153532,0261,565
JavaScript3282294
HTML318150

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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
imgs/ulp.png3,445.64KB1,909.24KB▼ 44.59%
imgs/psp.png172.58KB51.67KB▼ 70.06%
imgs/msf.png7.83KB7.83KB0.00%
close.png1.12KB0.87KB▼ 22.45%
imgs/ts.png2.04KB0.80KB▼ 60.57%