83% chatroll-live-chat

Code Review | Chatroll Live Chat

WordPress plugin Chatroll Live Chat scored83%from 54 tests.

About plugin

  • Plugin page: chatroll-live-chat
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.5
  • WordPress version: 6.3.1
  • First release: Feb 25, 2010
  • Latest release: Aug 29, 2020
  • Number of updates: 55
  • Update frequency: every 69.8 days
  • Top authors: chatroll (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active /62,945 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.06MB] [CPU: ▼8.19ms] Passed 4 tests

Analyzing server-side resources used by Chatroll Live Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.50 ▼9.59
Dashboard /wp-admin3.38 ▲0.0346.63 ▼14.27
Posts /wp-admin/edit.php3.49 ▲0.1344.70 ▼1.87
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.60 ▼7.01
Media Library /wp-admin/upload.php3.30 ▲0.0733.63 ▲0.74

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_chatroll
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Chatroll Live Chat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.50 ▼0.851.78 ▼0.1639.54 ▼6.68
Dashboard /wp-admin2,206 ▲185.85 ▲0.92106.20 ▼11.6938.99 ▼9.26
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0036.15 ▼1.1036.35 ▲4.03
Add New Post /wp-admin/post-new.php1,534 ▲2023.19 ▲5.56666.28 ▼46.4253.39 ▲1.17
Media Library /wp-admin/upload.php1,385 ▼04.19 ▼0.1296.36 ▼11.3543.34 ▼1.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_chatroll
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% 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 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/chatroll-live-chat/wp-chatroll.php:36

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: shoutbox, chatroll, facebook, widget, sidebar...

chatroll-live-chat/wp-chatroll.php 77% from 13 tests

Analyzing the main PHP file in "Chatroll Live Chat" version 2.4.0
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 310 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("chatroll-live-chat.php" instead of "wp-chatroll.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin329 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP269122329

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity15.75
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin