84% chat2

Code Review | Chat2

WordPress plugin Chat2 scored84%from 54 tests.

About plugin

  • Plugin page: chat2
  • Plugin version: 3.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 13, 2016
  • Latest release: Nov 7, 2023
  • Number of updates: 82
  • Update frequency: every 32.2 days
  • Top authors: chat2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /7,148 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Chat2
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.06 ▼2.70
Dashboard /wp-admin3.34 ▲0.0345.25 ▼7.85
Posts /wp-admin/edit.php3.45 ▲0.0951.89 ▼1.47
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.33 ▲11.75
Media Library /wp-admin/upload.php3.26 ▲0.0333.83 ▼2.28

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
chat-field-settings-var-content
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Chat2: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8714.85 ▲0.7030.90 ▲29.2741.32 ▲1.08
Dashboard /wp-admin2,206 ▲385.56 ▼0.1492.21 ▼14.7566.25 ▲20.27
Posts /wp-admin/edit.php2,117 ▲171.96 ▼0.0140.02 ▼4.6135.61 ▼3.14
Add New Post /wp-admin/post-new.php1,552 ▲2623.17 ▼0.39659.84 ▲20.47169.17 ▲118.24
Media Library /wp-admin/upload.php1,411 ▲114.22 ▲0.0299.06 ▼8.6574.52 ▲29.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/chat2/admin/deactivate.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
2 plugin tags: chat2, live chat

chat2/chat2.php Passed 13 tests

The main PHP file in "Chat2" ver. 3.6.2 adds more information about the plugin and also serves as the entry point for this plugin
59 characters long description:
This plugin adds Chat2 live chat to your wordpress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin243 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP67140188
SVG10155

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/32uldpi.png3.66KB0.90KB▼ 75.31%
assets/icon-256x256.png5.14KB3.01KB▼ 41.43%
assets/icon-128x128.png2.48KB1.51KB▼ 39.20%