84% yoo-bar

Code Review | YooBar - Creating multiple elements for the website's top bar and footer bar

WordPress plugin YooBar - Creating multiple elements for the website's top bar and footer bar scored84%from 54 tests.

About plugin

  • Plugin page: yoo-bar
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 7, 2021
  • Latest release: May 8, 2023
  • Number of updates: 18
  • Update frequency: every 43.1 days
  • Top authors: sharabindu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,800 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.66MB] [CPU: ▼5.81ms] Passed 4 tests

An overview of server-side resources used by YooBar - Creating multiple elements for the website's top bar and footer bar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6647.02 ▼0.55
Dashboard /wp-admin3.98 ▲0.6352.73 ▼9.61
Posts /wp-admin/edit.php4.03 ▲0.6761.04 ▲7.82
Add New Post /wp-admin/post-new.php6.60 ▲0.7091.09 ▼16.25
Media Library /wp-admin/upload.php3.90 ▲0.6741.56 ▲3.19
Add Bar /wp-admin/post-new.php?post_type=yoo_bar4.0964.94
All Bars /wp-admin/edit.php?post_type=yoo_bar3.9543.37
Getting Started /wp-admin/edit.php?post_type=yoo_bar&page=home3.8135.03

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 102 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for YooBar - Creating multiple elements for the website's top bar and footer bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19814.05 ▼0.326.87 ▲5.1438.57 ▼2.54
Dashboard /wp-admin2,252 ▲845.20 ▼0.37100.20 ▲11.5767.87 ▲24.15
Posts /wp-admin/edit.php2,168 ▲682.52 ▲0.5737.38 ▼0.1734.05 ▲0.47
Add New Post /wp-admin/post-new.php1,578 ▲5223.75 ▲0.12729.74 ▲58.5535.77 ▼21.20
Media Library /wp-admin/upload.php1,463 ▲694.75 ▲0.48105.38 ▲5.3879.67 ▲30.33
Add Bar /wp-admin/post-new.php?post_type=yoo_bar7,41510.00528.13266.78
All Bars /wp-admin/edit.php?post_type=yoo_bar1,1532.2337.1840.13
Getting Started /wp-admin/edit.php?post_type=yoo_bar&page=home1,7899.55293.93117.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 83× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/yoo-bar/assets/public/view/YooFieldMeta.php:2
    • > PHP Warning
      Use of undefined constant YOO_BAR_PATH - assumed 'YOO_BAR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/yoo-bar/assets/public/extra/ToPviews.php on line 17
    • > PHP Warning
      include(): Failed opening 'YOO_BAR_PATHassets/admin/extra/addressicon.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/yoo-bar/assets/public/view/YooAddress.php on line 3
    • > PHP Notice
      Undefined variable: yoo_bar_slideanimation in wp-content/plugins/yoo-bar/assets/public/view/YooTwoClmn.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yoo-bar/class/admin/class-yoo-howto-use.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/yoo-bar/assets/public/view/YooLinkBtn.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yoo-bar/includes/metaData/fieldData/class-yoo-address-field.php:86
    • > PHP Warning
      include(): Failed opening 'YOO_BAR_PATHassets/public/view/YooTwoClmn.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/yoo-bar/assets/public/extra/ToPviews.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yoo-bar/includes/metaData/fieldData/class-yoo-typed-animation.php:118
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yoo-bar/includes/metaData/fieldData/class-yoo-countdownwrap.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires at least: Version not formatted correctly
You can look at the official readme.txt

yoo-bar/yoo-bar.php 92% from 13 tests

"YooBar - Creating multiple elements for the website's top bar and footer bar" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 143 characters long)

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
No dangerous file extensions were detected60,698 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
XML191654,306
PHP458096134,426
CSS526691,773
JavaScript61311167
SVG172026

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.41
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods145
▷ Static methods21.38%
▷ Public methods14096.55%
▷ Protected methods00.00%
▷ Private methods53.45%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
8 compressed PNG files occupy 0.30MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/backgro.png71.85KB71.13KB▼ 1.01%
assets/admin/img/play.png2.79KB2.25KB▼ 19.17%
assets/admin/img/location-settings-min.png70.49KB69.77KB▼ 1.03%
assets/admin/img/DISPLAY-SETTINGS-min.png54.97KB53.97KB▼ 1.81%
assets/admin/img/jquery.minicolors.png67.02KB34.31KB▼ 48.80%