66% bonjour

Code Review | Bonjour Bar

WordPress plugin Bonjour Bar scored66%from 54 tests.

About plugin

  • Plugin page: bonjour
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 2, 2016
  • Latest release: Mar 8, 2016
  • Number of updates: 16
  • Update frequency: every 0.4 days
  • Top authors: wtyfolk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /900 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
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.13ms] Passed 4 tests

A check of server-side resources used by Bonjour Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.70 ▼1.22
Dashboard /wp-admin3.40 ▲0.1047.95 ▼5.78
Posts /wp-admin/edit.php3.52 ▲0.1651.50 ▲4.24
Add New Post /wp-admin/post-new.php6.00 ▲0.1286.07 ▼9.51
Media Library /wp-admin/upload.php3.33 ▲0.1035.57 ▲4.01
Bonjour Bar /wp-admin/options-general.php?page=bonjour3.4331.61

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Bonjour Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲5313.24 ▼1.121.56 ▼0.6043.57 ▼5.80
Dashboard /wp-admin2,219 ▲314.99 ▲0.12114.15 ▲12.9239.83 ▼0.89
Posts /wp-admin/edit.php2,099 ▲102.27 ▲0.2742.31 ▲5.5534.81 ▼2.35
Add New Post /wp-admin/post-new.php1,523 ▲323.06 ▼0.34646.48 ▲38.7762.53 ▲12.76
Media Library /wp-admin/upload.php1,392 ▲44.35 ▲0.1998.76 ▲0.9441.18 ▼2.03
Bonjour Bar /wp-admin/options-general.php?page=bonjour2,3427.49171.75138.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bonjour
    • > Notice in wp-content/plugins/bonjour/admin/partials/bonjour-admin-display.php+50
    Trying to access array offset on value of type bool

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bonjour/public/partials/bonjour-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bonjour/admin/partials/bonjour-admin-display.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=bonjour
    • > Network (severe)
    wp-content/plugins/bonjour/admin/https://fonts.googleapis.com/css?family=Playfair+Display%3A400%2C700&ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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:
  • Requires at least: Invalid version format
  • Screenshots: Screenshot #1 (Admin Panel) image missing
You can look at the official readme.txt

bonjour/bonjour.php Passed 13 tests

The main PHP file in "Bonjour Bar" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
55 characters long description:
Eye catching Promotion And Notification WordPress Bar !

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,829 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS210216699
PHP12275575685
JavaScript411320445

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions3
▷ Named functions3100.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

PNG files should be compressed to save space and minimize bandwidth usage
27 PNG files occupy 1.44MB with 1.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/exite-5.png16.94KB0.57KB▼ 96.64%
admin/images/exite-6.png17.81KB1.65KB▼ 90.76%
admin/images/grid/q-three-q.png17.81KB0.14KB▼ 99.23%
admin/images/site.png225.10KB66.27KB▼ 70.56%
admin/images/grid/icon.png17.85KB0.16KB▼ 99.10%