77% workchat

Code Review | WorkChat – Live Chat and Social chat button

WordPress plugin WorkChat – Live Chat and Social chat button scored77%from 54 tests.

About plugin

  • Plugin page: workchat
  • Plugin version: 2.2.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 16, 2022
  • Latest release: Jul 1, 2023
  • Number of updates: 19
  • Update frequency: every 10.4 days
  • Top authors: cloodoteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,123 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▲1.15ms] Passed 4 tests

A check of server-side resources used by WorkChat – Live Chat and Social chat button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.93 ▲3.53
Dashboard /wp-admin3.39 ▲0.0952.79 ▲2.42
Posts /wp-admin/edit.php3.50 ▲0.1546.34 ▲3.48
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.07 ▼4.83
Media Library /wp-admin/upload.php3.31 ▲0.0839.06 ▲4.70

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WorkChat – Live Chat and Social chat button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8414.28 ▼0.001.94 ▲0.3943.29 ▲0.29
Dashboard /wp-admin2,219 ▲425.57 ▼0.0582.77 ▼5.3574.18 ▲29.80
Posts /wp-admin/edit.php2,127 ▲241.97 ▼0.0236.21 ▼1.7033.97 ▼3.19
Add New Post /wp-admin/post-new.php1,563 ▲3022.78 ▼0.49699.52 ▲50.8589.31 ▲30.33
Media Library /wp-admin/upload.php1,424 ▲244.11 ▼0.1094.91 ▲1.5473.67 ▲28.51

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/workchat/cloodo-workchat.php
  • 5× 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/workchat/includes/cloodo_core.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/workchat/includes/clme_support.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/workchat/includes/clme_dashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/workchat/app/view/clme_icon_box.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/workchat/includes/clme_setting.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

workchat/cloodo-workchat.php 77% from 13 tests

The main PHP file in "WorkChat – Live Chat and Social chat button" ver. 2.2.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("workchat.php" instead of "cloodo-workchat.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.2")

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
No dangerous file extensions were detected3,029 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
CSS7124121,377
PHP795321,049
JavaScript56894582
SVG90021

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1263.16%
▷ Anonymous functions736.84%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icons8-messaging-50.png1.14KB1.20KB0.00%
admin/images/icons8-messaging-20.png0.41KB0.66KB0.00%
admin/images/chat (1).png13.96KB7.00KB▼ 49.88%
admin/images/cancel.png19.91KB8.96KB▼ 55.01%
admin/images/zalo.png1.24KB0.86KB▼ 31.00%