73% bonjoro

Code Review | Bonjoro

WordPress plugin Bonjoro scored73%from 54 tests.

About plugin

  • Plugin page: bonjoro
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2022
  • Latest release: Mar 23, 2023
  • Number of updates: 4
  • Update frequency: every 43.3 days
  • Top authors: shbonjoro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /751 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.98ms] Passed 4 tests

This is a short check of server-side resources used by Bonjoro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0426.97 ▼14.62
Dashboard /wp-admin3.37 ▲0.0748.32 ▼1.41
Posts /wp-admin/edit.php3.48 ▲0.1350.85 ▼3.88
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.86 ▼8.00
Media Library /wp-admin/upload.php3.29 ▲0.0641.74 ▲5.36
Bonjoro /wp-admin/options-general.php?page=bonjoro3.2534.44

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Bonjoro
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.25 ▼0.091.89 ▼0.0441.51 ▼2.73
Dashboard /wp-admin2,203 ▲265.68 ▲0.0392.42 ▲1.1637.67 ▼8.51
Posts /wp-admin/edit.php2,108 ▲82.03 ▲0.0439.85 ▲0.3435.62 ▼6.11
Add New Post /wp-admin/post-new.php1,535 ▲923.36 ▼0.32664.34 ▼23.6262.40 ▲4.14
Media Library /wp-admin/upload.php1,405 ▲54.14 ▼0.07110.71 ▲6.2746.97 ▼0.99
Bonjoro /wp-admin/options-general.php?page=bonjoro8241.9928.2829.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bonjoro
    • > Notice in wp-content/plugins/bonjoro/admin/class-bonjoro-admin.php+180
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/bonjoro/public/partials/bonjoro-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/bonjoro/admin/partials/bonjoro-admin-display.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: messaging, churn, video, retention, greetings...

bonjoro/bonjoro.php Passed 13 tests

"Bonjoro" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
Quickly and easily enable Bonjoro's Web Delivery for your WordPress site.

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
There were no executable files found in this plugin384 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12105512366
JavaScript232718
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2681.25%
▷ Protected methods00.00%
▷ Private methods618.75%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin