93% chatnox-live-chat

Code Review | Chatnox Live Chat Plugin (Free & Paid Plans)

WordPress plugin Chatnox Live Chat Plugin (Free & Paid Plans) scored 93% from 54 tests.

About plugin

  • Plugin page: chatnox-live-chat
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-5.2.2
  • WordPress version: 5.8.1
  • First release: Oct 21, 2014
  • Latest release: Jul 29, 2019
  • Number of updates: 155
  • Update frequency: every 11.2 days
  • Top authors: chatnox (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active / 15,831 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼139.30ms] Passed 4 tests

This is a short check of server-side resources used by Chatnox Live Chat Plugin (Free & Paid Plans)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1533.50 ▲15.52
Dashboard /wp-admin3.10 ▲0.0445.89 ▲1.91
Posts /wp-admin/edit.php3.15 ▲0.0447.73 ▲8.71
Add New Post /wp-admin/post-new.php5.45 ▲0.0290.26 ▼559.55
Media Library /wp-admin/upload.php3.04 ▲0.0326.35 ▼8.26

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chatnox Live Chat Plugin (Free & Paid Plans)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,724 ▲12815.86 ▲0.2210.92 ▲0.8952.51 ▲3.50
Dashboard /wp-admin2,984 ▲535.93 ▼0.00137.86 ▼1.34141.21 ▲25.03
Posts /wp-admin/edit.php2,778 ▲392.71 ▼0.0160.42 ▼5.6988.45 ▼7.40
Add New Post /wp-admin/post-new.php1,887 ▲38919.19 ▲0.42383.80 ▲12.85118.38 ▲3.50
Media Library /wp-admin/upload.php1,772 ▲395.00 ▼0.01126.58 ▼13.64156.62 ▲33.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatnox-live-chat/chatnox.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

chatnox-live-chat/chatnox.php 85% from 13 tests

This is the main PHP file of "Chatnox Live Chat Plugin (Free & Paid Plans)" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("chatnox-live-chat.php" instead of "chatnox.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin248 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP27738227
CSS10018
JavaScript1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected