10% zchat-enterprise

Code Review | ZChat - Live Chat Plugin for WordPress

WordPress plugin ZChat - Live Chat Plugin for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: zchat-enterprise
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.5.0
  • WordPress version: 6.3.1
  • First release: Jul 12, 2016
  • Latest release: Jul 12, 2016
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: zchat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /620 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/zchat-enterprise/plugin_files/ZChat.class.php+22
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼50.53ms] Passed 4 tests

This is a short check of server-side resources used by ZChat - Live Chat Plugin for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.09 ▼35.54
Dashboard /wp-admin2.09 ▼1.215.48 ▼42.19
Posts /wp-admin/edit.php2.09 ▼1.267.58 ▼39.37
Add New Post /wp-admin/post-new.php2.09 ▼3.796.15 ▼85.03
Media Library /wp-admin/upload.php2.09 ▼1.135.40 ▼29.87

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_zchat_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

ZChat - Live Chat Plugin for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4513.17 ▼1.341.59 ▼0.3343.65 ▼3.30
Dashboard /wp-admin2,222 ▲344.84 ▼0.09101.71 ▼15.6042.17 ▼3.69
Posts /wp-admin/edit.php2,102 ▲132.02 ▲0.0334.26 ▼5.8934.50 ▲2.89
Add New Post /wp-admin/post-new.php1,527 ▼617.76 ▼5.46623.15 ▼49.3067.82 ▲12.59
Media Library /wp-admin/upload.php1,407 ▲254.27 ▲0.0799.94 ▼3.0241.76 ▲0.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/zchat-enterprise/plugin_files/ZChat.class.php+22
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_zchat_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zchat-enterprise/plugin_files/ZChat.widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zchat-enterprise/plugin_files/ZChat.widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zchat-enterprise/plugin_files/ZChat.widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zchat-enterprise/plugin_files/ZChat.widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Chat window: A chat with a ZChat operator.), #2 (Chat window: Embedded Chat.), #3 (Mobile Console.), #4 (Proactive Chat Invitation.), #5 (Real-Time Visitor Monitoring.), #6 (Login Window), #7 (In-Page Chat.), #8 (Chat Box.)
You can look at the official readme.txt

zchat-enterprise/zchat.php 85% from 13 tests

The principal PHP file in "ZChat - Live Chat Plugin for WordPress" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zchat-enterprise.php" instead of "zchat.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 234 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 plugin188 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4519188

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods15
▷ Static methods320.00%
▷ Public methods1280.00%
▷ Protected methods320.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png64.71KB22.80KB▼ 64.76%
screenshot-1.png24.71KB8.67KB▼ 64.91%
screenshot-2.png31.72KB11.24KB▼ 64.55%
screenshot-6.png30.35KB11.48KB▼ 62.18%