78% chat-help

Code Review | Better Chat Support - Chat Bubble and Chat Button with Gutenberg, Elementor and Shortcode

WordPress plugin Better Chat Support - Chat Bubble and Chat Button with Gutenberg, Elementor and Shortcode scored78%from 54 tests.

About plugin

  • Plugin page: chat-help
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 17, 2023
  • Latest release: Nov 27, 2023
  • Number of updates: 24
  • Update frequency: every 13.1 days
  • Top authors: themeatelier (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /9,125 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.79MB] [CPU: ▲7.56ms] Passed 4 tests

Analyzing server-side resources used by Better Chat Support - Chat Bubble and Chat Button with Gutenberg, Elementor and Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.30 ▲1.8350.79 ▲8.10
Dashboard /wp-admin5.10 ▲1.7662.39 ▲3.40
Posts /wp-admin/edit.php5.16 ▲1.8064.95 ▲13.26
Add New Post /wp-admin/post-new.php7.69 ▲1.8199.86 ▲5.49
Media Library /wp-admin/upload.php5.03 ▲1.8050.78 ▲22.27

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 145 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
whatshelp-opt
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Better Chat Support - Chat Bubble and Chat Button with Gutenberg, Elementor and Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,082 ▲32016.18 ▲1.4525.25 ▲23.5793.40 ▲50.01
Dashboard /wp-admin2,260 ▲835.53 ▼0.1096.12 ▲0.9791.40 ▲50.74
Posts /wp-admin/edit.php2,184 ▲842.13 ▲0.1239.60 ▼7.2839.11 ▲2.64
Add New Post /wp-admin/post-new.php6,276 ▲4,75019.57 ▼4.00863.78 ▲250.0937.78 ▼18.89
Media Library /wp-admin/upload.php1,480 ▲834.21 ▲0.0598.19 ▼0.4080.66 ▲38.01
Whatshelp settings /wp-admin/admin.php?page=whatshelp#tab=whatshelp-settings4,4925.25130.3188.61
Buttons shortcodes /wp-admin/admin.php?page=whatshelp#tab=buttons-shortcodes4,3455.4066.1991.05
Backup /wp-admin/admin.php?page=whatshelp#tab=backup4,3265.3872.4496.98

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 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • whatshelp-opt
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/chat-help/inc/class-enqueue.php
    • > /wp-content/plugins/chat-help/chat-whatsapp.php
    • > /wp-content/plugins/chat-help/inc/functions.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WHATSHELP_ALERT_MSG - assumed 'WHATSHELP_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/chat-help/inc/class-enqueue.php on line 11
    • > PHP Warning
      Use of undefined constant WHATSHELP_ALERT_MSG - assumed 'WHATSHELP_ALERT_MSG' (this will throw an Error in a future version of PHP) in wp-content/plugins/chat-help/inc/functions.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chat-help/view/chat-bubbles/chat-bubbles.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/chat-help/view/shortcodes/custom-shortcode.php:11

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: click to whatsapp, floating whatsapp, whatsapp plugin, whatsapp support, whatsapp button...

chat-help/chat-whatsapp.php 85% from 13 tests

The primary PHP file in "Better Chat Support - Chat Bubble and Chat Button with Gutenberg, Elementor and Shortcode" version 1.3.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("chat-help.php" instead of "chat-whatsapp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin31,048 lines of code in 114 files:
LanguageFilesBlank linesComment linesLines of code
PHP782,8291,59010,619
Sass1799177,161
JavaScript81,3175236,791
CSS84435176,327
JSON120148
SVG2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity24.73
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity6.20
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes67
▷ Abstract classes22.99%
▷ Concrete classes6597.01%
▷ Final classes11.54%
Methods306
▷ Static methods4013.07%
▷ Public methods28492.81%
▷ Protected methods72.29%
▷ Private methods154.90%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/bubble-4.png8.27KB3.60KB▼ 56.43%
assets/image/button-with-info.png14.12KB5.47KB▼ 61.27%
assets/image/bubble-5.png8.28KB3.45KB▼ 58.30%
assets/image/bubble-1.png1.64KB1.21KB▼ 26.16%
assets/image/bubble-7.png5.58KB2.52KB▼ 54.91%