88% bavard

Code Review | Bavard

WordPress plugin Bavard scored 88% from 54 tests.

About plugin

  • Plugin page: bavard
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-5.5
  • WordPress version: 5.9.2
  • First release: Oct 14, 2020
  • Latest release: Apr 20, 2021
  • Number of updates: 21
  • Update frequency: every 9.0 days
  • Top authors: samuelwebmob2997 (71.43%)davidwbrwn (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 383 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼292.85ms] Passed 4 tests

A check of server-side resources used by Bavard
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1557.16 ▲7.50
Dashboard /wp-admin3.51 ▲0.1034.21 ▼0.39
Posts /wp-admin/edit.php3.73 ▲0.0937.02 ▼0.48
Add New Post /wp-admin/post-new.php6.98 ▲0.0193.89 ▼1,173.33
Media Library /wp-admin/upload.php3.38 ▲0.0927.75 ▲2.81

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: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Bavard
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,912 ▲15816.35 ▲0.718.69 ▲2.782.06 ▼0.41
Dashboard /wp-admin2,910 ▲496.21 ▲0.00115.29 ▼21.27156.21 ▼6.43
Posts /wp-admin/edit.php2,706 ▲153.24 ▲0.0165.57 ▲1.21139.86 ▼7.77
Add New Post /wp-admin/post-new.php1,766 ▲10521.05 ▲5.01447.49 ▲41.52158.01 ▼4.98
Media Library /wp-admin/upload.php1,720 ▲195.53 ▲0.03142.29 ▲2.93188.93 ▲5.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bavard/public/partials/bavard-plugin-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/bavard/admin/partials/bavard-plugin-admin-display.php:20

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 Passed 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
5 plugin tags: engagement, marketing, chatbot, virtual assistant, support

bavard/bavard-plugin.php 85% from 13 tests

The main PHP script in "Bavard" version 1.0.4 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bavard.php" instead of "bavard-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin443 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12150540414
Markdown119023
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.29
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected