83% brosix-live-chat

Code Review | Brosix Live Chat

WordPress plugin Brosix Live Chat scored83%from 54 tests.

About plugin

  • Plugin page: brosix-live-chat
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 3, 2020
  • Latest release: Mar 22, 2023
  • Number of updates: 15
  • Update frequency: every 56.1 days
  • Top authors: brosix (100%)Otto42 (13.33%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /718 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼10.62ms] Passed 4 tests

An overview of server-side resources used by Brosix Live Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0941.27 ▼7.87
Dashboard /wp-admin3.43 ▲0.0449.06 ▼23.19
Posts /wp-admin/edit.php3.54 ▲0.1450.51 ▼0.96
Add New Post /wp-admin/post-new.php6.03 ▲0.1087.86 ▼10.44
Media Library /wp-admin/upload.php3.35 ▲0.0839.94 ▲4.56

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
brosix-chat-network
brosix-chat-id
widget_recent-posts
brosix-chat-status
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Brosix Live Chat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.35 ▼0.011.99 ▲0.3444.44 ▲2.30
Dashboard /wp-admin2,202 ▲225.68 ▼0.0381.56 ▼17.53101.61 ▲57.62
Posts /wp-admin/edit.php2,125 ▲222.02 ▲0.0436.67 ▲0.1043.80 ▲8.71
Add New Post /wp-admin/post-new.php1,700 ▲17222.29 ▼0.79657.76 ▼24.4370.92 ▲12.19
Media Library /wp-admin/upload.php1,416 ▲224.17 ▼0.0799.33 ▼14.1777.06 ▲31.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • brosix-chat-status
    • can_compress_scripts
    • brosix-chat-id
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/brosix-live-chat/public/partials/brosix-livechat-public-display.php
    • > /wp-content/plugins/brosix-live-chat/admin/partials/brosix-livechat-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === brosix-live-chat === )
The official readme.txt might help

brosix-live-chat/brosix-live-chat.php 92% from 13 tests

The main PHP file in "Brosix Live Chat" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,056 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS232131,033
PHP12154537672
JavaScript22854184
SVG1101167

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity2.71
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/brosix-logo.png9.70KB5.35KB▼ 44.86%
admin/images/brosix-chat.png107.96KB49.84KB▼ 53.83%
admin/images/brosix-chat-icon.png0.57KB0.28KB▼ 51.28%