73% foobar-notifications-lite

Code Review | Notification Bar, Announcement and Cookie Notice WordPress Plugin - FooBar

WordPress plugin Notification Bar, Announcement and Cookie Notice WordPress Plugin - FooBar scored73%from 54 tests.

About plugin

  • Plugin page: foobar-notificati...
  • Plugin version: 2.1.32
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 14, 2011
  • Latest release: Aug 15, 2023
  • Number of updates: 37
  • Update frequency: every 116.5 days
  • Top authors: bradvin (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

3,000+ active /40,952 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲5.17MB] [CPU: ▲29.60ms] 75% from 4 tests

Server-side resources used by Notification Bar, Announcement and Cookie Notice WordPress Plugin - FooBar
Please have a look at the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.17MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.98 ▲5.5174.52 ▲30.64
Dashboard /wp-admin9.00 ▲5.6977.70 ▲23.73
Posts /wp-admin/edit.php9.00 ▲5.6477.62 ▲25.89
Add New Post /wp-admin/post-new.php9.72 ▲3.83132.84 ▲38.13
Media Library /wp-admin/upload.php9.00 ▲5.7676.82 ▲39.14
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.0065.59

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 440 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
fs_debug_mode
db_upgraded
fs_active_plugins
fs_accounts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Notification Bar, Announcement and Cookie Notice WordPress Plugin - FooBar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.35 ▼0.251.55 ▼0.1328.29 ▼21.75
Dashboard /wp-admin2,227 ▲535.48 ▼0.1687.29 ▼12.5641.76 ▼5.93
Posts /wp-admin/edit.php2,133 ▲332.03 ▲0.0535.05 ▼0.4037.57 ▲1.80
Add New Post /wp-admin/post-new.php1,548 ▲2222.76 ▼0.22620.72 ▼69.8256.18 ▼6.10
Media Library /wp-admin/upload.php1,435 ▲384.23 ▲0.13100.66 ▼19.4354.37 ▲6.56
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0971.6827.0529.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/foobar-notifications-lite/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_debug_mode
    • fs_active_plugins
    • fs_accounts

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 | 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
Please take a closer look at the following
  • 167× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foobar-notifications-lite/vendor/composer/installers/src/Composer/Installers/MiaoxingInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foobar-notifications-lite/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foobar-notifications-lite/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'FooPlugins\\FooBar\\Admin\\FooFields\\Fields\\Field' not found in wp-content/plugins/foobar-notifications-lite/includes/admin/foofields/fields/class-selectize.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foobar-notifications-lite/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foobar-notifications-lite/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'FooPlugins\\FooBar\\Admin\\FooFields\\Fields\\Field' not found in wp-content/plugins/foobar-notifications-lite/includes/admin/foofields/custom/conditions/group/class-field.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foobar-notifications-lite/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foobar-notifications-lite/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/foobar-notifications-lite/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php:4

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Frontend Demo - Call To Action) image missing
The official readme.txt is a good inspiration

foobar-notifications-lite/foobar.php 85% from 13 tests

The main file in "Notification Bar, Announcement and Cookie Notice WordPress Plugin - FooBar" v. 2.1.32 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 ("foobar-notifications-lite.php" instead of "foobar.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected59,883 lines of code in 356 files:
LanguageFilesBlank linesComment linesLines of code
PHP31910,12120,20843,530
JavaScript153,1078,10514,671
CSS20274341,400
JSON200282

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity24.08
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces43
Interfaces0
Traits0
Classes236
▷ Abstract classes114.66%
▷ Concrete classes22595.34%
▷ Final classes00.00%
Methods1,807
▷ Static methods23212.84%
▷ Public methods1,35174.76%
▷ Protected methods703.87%
▷ Private methods38621.36%
Functions158
▷ Named functions15094.94%
▷ Anonymous functions85.06%
Constants184
▷ Global constants13271.74%
▷ Class constants5228.26%
▷ Public constants52100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
32 PNG files occupy 0.93MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/foobar-blurb-sign-up_success.png29.12KB7.03KB▼ 75.86%
assets/admin/img/foobar-help-pro-freeshipping.png12.17KB13.06KB0.00%
assets/admin/img/foobar-help-pro-visibility.png60.72KB21.17KB▼ 65.13%
assets/admin/img/foobar-help-pro-customization.png64.72KB22.31KB▼ 65.53%
assets/admin/img/foobar-help-pro-triggers.png60.91KB22.23KB▼ 63.50%