10% live-chat-support-system

Code Review | Live Chat

WordPress plugin Live Chat scored 10% from 54 tests.

About plugin

  • Plugin page: live-chat-support...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9
  • WordPress version: 6.3.1
  • First release: Aug 5, 2016
  • Latest release: Nov 17, 2017
  • Number of updates: 24
  • Update frequency: every 19.5 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 9,788 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/live-chat-support-system/supportsystem.php+63
    date_default_timezone_set(): Timezone ID '' is invalid

Server metrics [RAM: ▼1.94MB] [CPU: ▼49.25ms] Passed 4 tests

Analyzing server-side resources used by Live Chat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.05 ▼33.54
Dashboard /wp-admin2.07 ▼1.246.56 ▼40.86
Posts /wp-admin/edit.php2.07 ▼1.295.10 ▼41.54
Add New Post /wp-admin/post-new.php2.07 ▼3.825.85 ▼81.04
Media Library /wp-admin/upload.php2.07 ▼1.165.56 ▼28.95
Support Live chat /wp-admin/admin.php?page=support_page2.075.03
/wp-admin/admin.php?page=support_chat2.076.27
Offline Messages /wp-admin/admin.php?page=offline_messages2.075.20
Settings /wp-admin/admin.php?page=support_settings2.075.76

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 69 new files
Database: 4 new tables, 7 new options
New tables
wp_tbl_offlinechat
wp_tbl_messages
wp_tbl_conversation
wp_tbl_agents
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
support_page_options
widget_recent-comments

Browser metrics Passed 4 tests

Live Chat: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲32613.59 ▼0.795.21 ▲3.4654.20 ▲12.76
Dashboard /wp-admin2,241 ▲535.18 ▼0.70101.00 ▼0.4735.56 ▼5.93
Posts /wp-admin/edit.php2,141 ▲492.41 ▲0.3736.20 ▼0.1029.13 ▼5.95
Add New Post /wp-admin/post-new.php1,549 ▲3523.59 ▲6.05672.26 ▼33.8466.20 ▲9.97
Media Library /wp-admin/upload.php1,433 ▲424.49 ▲0.2698.55 ▼6.2642.64 ▼5.93
Support Live chat /wp-admin/admin.php?page=support_page1,0412.5344.6458.24
/wp-admin/admin.php?page=support_chat7001.6311.7421.04
Offline Messages /wp-admin/admin.php?page=offline_messages1,0442.4741.7431.38
Settings /wp-admin/admin.php?page=support_settings1,2662.4631.6339.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/live-chat-support-system/supportsystem.php+63
    date_default_timezone_set(): Timezone ID '' is invalid
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_tbl_agents
    • wp_tbl_messages
    • wp_tbl_conversation
    • wp_tbl_offlinechat
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • support_page_options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=support_settings
    • > Notice in wp-content/plugins/live-chat-support-system/supportsystem.php+63
    date_default_timezone_set(): Timezone ID '' is invalid
  • 26 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=offline_messages
    • > Warning in wp-content/plugins/live-chat-support-system/inc/offline_messages.php+63
    Use of undefined constant supportsystem - assumed 'supportsystem' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=support_page
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/live-chat-support-system/supportsystem.php+76
    Undefined index: page
    • > GET request to /wp-admin/admin.php?page=support_settings
    • > Notice in wp-content/plugins/live-chat-support-system/inc/setting_dashboard.php+32
    Undefined variable: user_ID

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/live-chat-support-system/index.php
    • > /wp-content/plugins/live-chat-support-system/inc/setting_dashboard.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/live-chat-support-system/supportsystem.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/live-chat-support-system/inc/lvcht_agent_dashboard.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=support_page
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=support_page 0:0 Uncaught SyntaxError: Unexpected end of JSON input

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: customer support system, attachments, live chat, chat sytem, support system...

live-chat-support-system/supportsystem.php 85% from 13 tests

The main file in "Live Chat" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("live-chat-support-system.php" instead of "supportsystem.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin7,069 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript55561222,725
PHP25981632,559
CSS9891,100
SVG100685

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.18MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/yes.png0.45KB0.60KB0.00%
inc/img/icon-upload.png0.33KB0.33KB0.30%
inc/img/emozi-icon.png1.02KB1.05KB0.00%
inc/img/icon-upload-white.png1.10KB0.30KB▼ 73.07%
inc/img/image-default-3.png29.34KB20.77KB▼ 29.20%