78% wp-live-chat-software-for-wordpress

Code Review | LiveChat - WP live chat plugin for WordPress

WordPress plugin LiveChat - WP live chat plugin for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: wp-live-chat-soft...
  • Plugin version: 4.5.14
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Mar 10, 2010
  • Latest release: Oct 31, 2023
  • Number of updates: 296
  • Update frequency: every 16.8 days
  • Top authors: livechat (100%)

Code review

54 tests

User reviews

89 reviews

Install metrics

20,000+ active /924,585 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.74MB] [CPU: ▲5.73ms] Passed 4 tests

A check of server-side resources used by LiveChat - WP live chat plugin for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5948.23 ▲10.46
Dashboard /wp-admin4.09 ▲0.7959.98 ▲4.93
Posts /wp-admin/edit.php4.15 ▲0.7957.07 ▲11.74
Add New Post /wp-admin/post-new.php6.68 ▲0.79100.40 ▼4.21
Media Library /wp-admin/upload.php4.02 ▲0.7951.86 ▲14.66
Resources /wp-admin/admin.php?page=livechat_resources3.9237.35
Settings /wp-admin/admin.php?page=livechat_settings3.9241.74

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 154 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
livechat_public_key
livechat_platform
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

LiveChat - WP live chat plugin for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲20830.04 ▲15.412.74 ▲1.1737.38 ▼1.39
Dashboard /wp-admin2,355 ▲1785.79 ▲0.06126.95 ▲27.94103.98 ▲61.08
Posts /wp-admin/edit.php2,262 ▲1622.67 ▲0.6466.26 ▲31.5854.13 ▲16.81
Add New Post /wp-admin/post-new.php6,466 ▲4,94036.20 ▲13.231,180.98 ▲499.1636.52 ▼15.91
Media Library /wp-admin/upload.php1,589 ▲19219.39 ▲15.18327.83 ▲213.5694.75 ▲46.77
Resources /wp-admin/admin.php?page=livechat_resources1,44217.88797.8668.93
Settings /wp-admin/admin.php?page=livechat_settings88021.53397.4745.95

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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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 50% 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
Please fix the following
  • 60× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\OptionsSet' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Options/ReviewNoticeOptions.class.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\otifications\otification' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Notifications/Notice.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\Deprecated\\DeprecatedOption' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Options/Deprecated/Widget/DeprecatedWidgetWooCommerceSettings.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Elementor\\Dependencies\\WidgetDependencies' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Elementor/Dependencies/ContactButtonWidgetDependencies.class.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Elementor\\Dependencies\\Scripts\\ScriptDependency' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Elementor/Dependencies/Scripts/QualityBadgeScriptDependency.class.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Templates\\Template' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Templates/ChatWidgetScriptTemplate.class.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\OptionsSet' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Options/Deprecated/Widget/DeprecatedWidgetSettings.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\WritableOption' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Options/Elementor/ContactButtonWidgetURL.class.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\OptionsSet' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Options/Deprecated/DeprecatedOptions.class.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\Option' not found in wp-content/plugins/wp-live-chat-software-for-wordpress/plugin_files/Services/Options/UserOption.class.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=livechat_resources
    • > Console-api (warning) in unknown
    https://static.hotjar.com/c/hotjar-354332.js?sv=5 2:6897 "Hotjar not launching due to suspicious userAgent:" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/118.0.5993.117 Safari/537.36"
    • > GET request to /wp-admin/admin.php?page=livechat_resources
    • > Network (severe)
    https://accounts.livechat.com/v2/sessions/tagged - Failed to load resource: the server responded with a status of 404 ()

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
5 plugin tags: live chat, wordpress chat, wordpress live chat, live chat plugin, chat plugin

wp-live-chat-software-for-wordpress/livechat.php 85% from 13 tests

The primary PHP file in "LiveChat - WP live chat plugin for WordPress" version 4.5.14 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-live-chat-software-for-wordpress.php" instead of "livechat.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
No dangerous file extensions were detected5,786 lines of code in 139 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141,0303,9834,407
Twig12350442
CSS5716347
Markdown1540235
JavaScript150163
JSON300143
SVG20248
HTML1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.31
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces24
Interfaces0
Traits0
Classes106
▷ Abstract classes10.94%
▷ Concrete classes10599.06%
▷ Final classes10.95%
Methods361
▷ Static methods9125.21%
▷ Public methods30785.04%
▷ Protected methods71.94%
▷ Private methods4713.02%
Functions18
▷ Named functions738.89%
▷ Anonymous functions1161.11%
Constants20
▷ Global constants1680.00%
▷ Class constants420.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.70MB with 0.45MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin_files/images/lc-plus-wp.png16.95KB6.85KB▼ 59.60%
plugin_files/images/lc-plus-wp@2x.png34.59KB13.34KB▼ 61.43%
plugin_files/images/lc-app.png666.92KB200.06KB▼ 70.00%