83% zalo-live-chat

Code Review | Zalo Live Chat

WordPress plugin Zalo Live Chat scored83%from 54 tests.

About plugin

  • Plugin page: zalo-live-chat
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Nov 10, 2017
  • Latest release: Nov 29, 2017
  • Number of updates: 4
  • Update frequency: every 4.8 days
  • Top authors: dangngocbinh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /10,255 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.42ms] Passed 4 tests

Analyzing server-side resources used by Zalo Live Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.57 ▼2.92
Dashboard /wp-admin3.32 ▲0.0248.68 ▼4.71
Posts /wp-admin/edit.php3.37 ▲0.0151.31 ▼3.32
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.29 ▼2.74
Media Library /wp-admin/upload.php3.24 ▲0.0140.54 ▲5.60
Zalo Live Chat /wp-admin/options-general.php?page=zalo-livechat3.2130.86

Server storage [IO: ▲0.52MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Zalo Live Chat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1114.45 ▼0.141.73 ▼0.2242.53 ▼6.33
Dashboard /wp-admin2,203 ▲295.65 ▲0.0392.27 ▼12.4542.67 ▼1.89
Posts /wp-admin/edit.php2,108 ▲82.02 ▲0.0041.75 ▲5.3437.35 ▲1.55
Add New Post /wp-admin/post-new.php1,533 ▼523.62 ▲5.60669.66 ▲65.6461.43 ▼7.61
Media Library /wp-admin/upload.php1,411 ▲114.18 ▲0.0697.75 ▼33.0046.30 ▼9.55
Zalo Live Chat /wp-admin/options-general.php?page=zalo-livechat9082.0126.3639.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/zalo-live-chat/admin/partials/zalo-livechat-admin-display.php
    • > /wp-content/plugins/zalo-live-chat/public/partials/zalo-livechat-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("thikshare.com")
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === zalo-live-chat === )
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in zalo-live-chat/assets to your readme.txt
You can take inspiration from this readme.txt

zalo-live-chat/zalo-livechat.php 85% from 13 tests

The entry point to "Zalo Live Chat" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("zalo-live-chat.php" instead of "zalo-livechat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin322 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13143532278
CSS29436
JavaScript22278

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods2480.00%
▷ Protected methods00.00%
▷ Private methods620.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin