77% livechat-woocommerce

Code Review | WordPress Live Chat Plugin for WooCommerce - LiveChat

WordPress plugin WordPress Live Chat Plugin for WooCommerce - LiveChat scored77%from 54 tests.

About plugin

  • Plugin page: livechat-woocommerce
  • Plugin version: 2.2.15
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Feb 24, 2016
  • Latest release: Oct 31, 2023
  • Number of updates: 126
  • Update frequency: every 22.3 days
  • Top authors: livechat (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

2,000+ active /136,824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▲4.32ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Live Chat Plugin for WooCommerce - LiveChat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.92 ▲2.91
Dashboard /wp-admin3.47 ▲0.1657.49 ▲10.21
Posts /wp-admin/edit.php3.52 ▲0.1651.35 ▲4.66
Add New Post /wp-admin/post-new.php6.05 ▲0.1690.71 ▼0.03
Media Library /wp-admin/upload.php3.39 ▲0.1644.64 ▲9.74
Settings /wp-admin/admin.php?page=livechat_settings3.3039.18
Resources /wp-admin/admin.php?page=livechat_resources3.2936.36

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 154 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
livechat_platform
livechat_public_key
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Live Chat Plugin for WooCommerce - LiveChat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲20830.23 ▲15.882.70 ▲1.0040.14 ▼2.55
Dashboard /wp-admin2,335 ▲1545.38 ▼0.44131.54 ▲27.0285.85 ▲45.59
Posts /wp-admin/edit.php2,269 ▲1722.89 ▲0.8753.34 ▲14.6350.57 ▲16.22
Add New Post /wp-admin/post-new.php6,482 ▲4,94536.26 ▲18.021,216.29 ▲614.2137.80 ▼42.17
Media Library /wp-admin/upload.php1,589 ▲19219.43 ▲15.22333.28 ▲233.7991.63 ▲47.70
Settings /wp-admin/admin.php?page=livechat_settings85119.92328.3544.75
Resources /wp-admin/admin.php?page=livechat_resources1,41717.29788.2866.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 60× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\OptionsSet' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Options/Deprecated/Widget/DeprecatedWidgetSettings.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\otifications\otification' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Notifications/Notice.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\Option' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Options/UserOption.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Elementor\\Dependencies\\Scripts\\ScriptDependency' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Elementor/Dependencies/Scripts/QualityBadgeScriptDependency.class.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\ReadableOption' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Options/ReviewNoticeOffset.class.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\UserOption' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Options/WooCommerce/WooCommerceUserOption.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\Deprecated\\DeprecatedOption' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Options/Deprecated/DeprecatedReviewNoticeOffset.class.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\otifications\otification' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Notifications/DeactivationModal.class.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Templates\\Template' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Templates/DeactivationModalTemplate.class.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'LiveChat\\Services\\Options\\Option' not found in wp-content/plugins/livechat-woocommerce/plugin_files/Services/Options/ReadableOption.class.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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 90% 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: woocommerce live chat, live chat, wordpress live chat, woocommerce, chat plugin

livechat-woocommerce/woocommerce-livechat.php 77% from 13 tests

The principal PHP file in "WordPress Live Chat Plugin for WooCommerce - LiveChat" v. 2.2.15 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)
  • 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: The principal plugin file should be the same as the plugin slug ("livechat-woocommerce.php" instead of "woocommerce-livechat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions 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

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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

PNG files should be compressed to save space and minimize bandwidth usage
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@2x.png34.59KB13.34KB▼ 61.43%
plugin_files/images/lc-app.png666.92KB200.06KB▼ 70.00%
plugin_files/images/lc-plus-wp.png16.95KB6.85KB▼ 59.60%