73% oncustomer-livechat

Code Review | OnCustomer Livechat

WordPress plugin OnCustomer Livechat scored73%from 54 tests.

About plugin

  • Plugin page: oncustomer-livechat
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.4
  • WordPress version: 6.3.1
  • First release: May 9, 2020
  • Latest release: May 12, 2020
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: kiennguyen07 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /517 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼58.72ms] Passed 4 tests

This is a short check of server-side resources used by OnCustomer Livechat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.73 ▼36.42
Dashboard /wp-admin2.08 ▼1.225.84 ▼46.48
Posts /wp-admin/edit.php2.08 ▼1.275.65 ▼47.30
Add New Post /wp-admin/post-new.php2.08 ▼3.816.53 ▼104.69
Media Library /wp-admin/upload.php2.08 ▼1.155.87 ▼34.75

Server storage [IO: ▲0.70MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/oncustomer-livechat/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by OnCustomer Livechat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲8514.74 ▲0.361.88 ▲0.2043.14 ▲2.37
Dashboard /wp-admin2,251 ▲484.88 ▼1.00107.06 ▲3.1342.17 ▼1.96
Posts /wp-admin/edit.php2,127 ▲241.99 ▼0.0734.45 ▼5.2436.74 ▼1.18
Add New Post /wp-admin/post-new.php1,555 ▲2923.11 ▲5.71718.16 ▲56.9656.49 ▼8.19
Media Library /wp-admin/upload.php1,424 ▲274.21 ▼0.0699.75 ▼13.0843.57 ▼3.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the livechat.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/oncustomer-livechat/livechat.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Màn hình yêu cầu tích hợp OnCustomer Livechat.), #2 (Tích hợp OnCustomer Livechat thành công.), #3 (Biểu tượng OnCustomer Livechat trên website.), #4 (Sử dụng OnCustomer Livechat trên website.)
Please take inspiration from this readme.txt

oncustomer-livechat/livechat.php 92% from 13 tests

Analyzing the main PHP file in "OnCustomer Livechat" version 1.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("oncustomer-livechat.php" instead of "livechat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin337 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG400135
PHP1219103
CSS118099

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/check.png1.16KB0.56KB▼ 51.82%
images/logo.png7.97KB4.05KB▼ 49.26%