78% engagebay-livechat

Code Review | EngageBay Live Chat - Best live chat plugin for WordPress sites

WordPress plugin EngageBay Live Chat - Best live chat plugin for WordPress sites scored78%from 54 tests.

About plugin

  • Plugin page: engagebay-livechat
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Oct 31, 2019
  • Latest release: Aug 20, 2023
  • Number of updates: 17
  • Update frequency: every 81.8 days
  • Top authors: engagebay (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /6,157 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by EngageBay Live Chat - Best live chat plugin for WordPress sites
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.43 ▲1.01
Dashboard /wp-admin3.41 ▲0.1046.31 ▼6.51
Posts /wp-admin/edit.php3.46 ▲0.1048.54 ▲6.28
Add New Post /wp-admin/post-new.php6.01 ▲0.1295.67 ▼3.30
Media Library /wp-admin/upload.php3.33 ▲0.1035.08 ▲2.85

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 211 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

EngageBay Live Chat - Best live chat plugin for WordPress sites: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,240 ▲50513.23 ▼1.151.52 ▼0.1133.61 ▼12.21
Dashboard /wp-admin2,643 ▲4524.91 ▼0.91105.81 ▲1.8489.01 ▲40.36
Posts /wp-admin/edit.php2,105 ▲192.05 ▲0.0438.65 ▲1.9034.76 ▲4.09
Add New Post /wp-admin/post-new.php1,531 ▼223.16 ▼0.31677.07 ▲4.4255.59 ▲0.84
Media Library /wp-admin/upload.php1,404 ▲194.12 ▼0.0497.52 ▼0.8172.09 ▲26.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/engagebay-livechat/index.php
  • 58× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/engagebay-livechat/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Warning
      require_once(lib/byte_safe_strings.php): failed to open stream: No such file or directory in wp-content/plugins/engagebay-livechat/vendor/paragonie/random_compat/psalm-autoload.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\OAuth2\\Client\\Token\\AccessTokenInterface' not found in wp-content/plugins/engagebay-livechat/vendor/league/oauth2-client/src/Token/ResourceOwnerAccessTokenInterface.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/engagebay-livechat/vendor/guzzlehttp/psr7/src/Request.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/engagebay-livechat/vendor/guzzlehttp/promises/src/Coroutine.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/engagebay-livechat/vendor/guzzlehttp/promises/src/EachPromise.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/engagebay-livechat/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/engagebay-livechat/vendor/guzzlehttp/psr7/src/UploadedFile.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/engagebay-livechat/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Grant\\AbstractGrant' not found in wp-content/plugins/engagebay-livechat/vendor/league/oauth2-client/src/Grant/AuthorizationCode.php:22

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can look at the official readme.txt

engagebay-livechat/index.php 85% from 13 tests

The principal PHP file in "EngageBay Live Chat - Best live chat plugin for WordPress sites" v. 1.1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("engagebay-livechat.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 184 characters long)

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 plugin19,562 lines of code in 187 files:
LanguageFilesBlank linesComment linesLines of code
PHP1332,3236,40213,410
Markdown181,29503,775
JSON1210981
CSS2395650
SVG15213635
JavaScript317270
XML10019
Dockerfile18010
make1409
Bourne Shell1203

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.04
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces18
Interfaces19
Traits9
Classes83
▷ Abstract classes22.41%
▷ Concrete classes8197.59%
▷ Final classes1316.05%
Methods827
▷ Static methods12715.36%
▷ Public methods63877.15%
▷ Protected methods587.01%
▷ Private methods13115.84%
Functions213
▷ Named functions12458.22%
▷ Anonymous functions8941.78%
Constants105
▷ Global constants4441.90%
▷ Class constants6158.10%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/engagebay.png13.12KB4.67KB▼ 64.38%
images/preview.png0.84KB0.59KB▼ 29.84%
images/refresh-icon.png4.46KB2.66KB▼ 40.53%
images/edit.png0.42KB0.29KB▼ 31.24%
images/preview-n.png2.21KB1.84KB▼ 17.02%