68% single-user-chat

Code Review | Single-user-chat

WordPress plugin Single-user-chat scored 68% from 54 tests.

About plugin

  • Plugin page: single-user-chat
  • Plugin version: 0.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2018
  • Latest release: Jan 3, 2019
  • Number of updates: 19
  • Update frequency: every 16.8 days
  • Top authors: aakashbhagat23 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active / 1,538 total downloads

Benchmarks

Plugin footprint 65% from 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.29ms] Passed 4 tests

Analyzing server-side resources used by Single-user-chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0226.40 ▼15.63
Dashboard /wp-admin3.38 ▲0.0748.54 ▲0.35
Posts /wp-admin/edit.php3.43 ▲0.0745.37 ▼1.38
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.27 ▼20.50
Media Library /wp-admin/upload.php3.30 ▲0.0736.68 ▲3.33

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: 2 new tables, 8 new options
New tables
wp_chat_sessions
wp_chat_data
New WordPress options
single_user_chat
widget_theysaidso_widget
theysaidso_admin_options
admin
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Single-user-chat: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.74 ▲0.362.50 ▲0.6943.47 ▲1.49
Dashboard /wp-admin2,225 ▲334.82 ▼0.1099.70 ▼14.9240.67 ▼3.04
Posts /wp-admin/edit.php2,105 ▲192.06 ▲0.0433.91 ▼0.8633.65 ▼1.64
Add New Post /wp-admin/post-new.php1,560 ▲2718.23 ▼4.91591.04 ▼12.5479.18 ▲17.61
Media Library /wp-admin/upload.php1,404 ▲164.20 ▼0.0097.82 ▲1.9343.33 ▼0.14

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
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_chat_sessions
    • wp_chat_data
  • This plugin does not fully uninstall, leaving 8 options in the database
    • single_user_chat
    • admin
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/single-user-chat/include/multi-chat-scetion.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_avatar() in wp-content/plugins/single-user-chat/include/chat-section.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/single-user-chat/include/chat-section.php on line 1
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/single-user-chat/include/chat-section.php on line 1
    • > PHP Notice
      Undefined variable: display_name in wp-content/plugins/single-user-chat/include/chat-section.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed: You can take inspiration from this readme.txt

single-user-chat/single-user-chat.php 92% from 13 tests

"Single-user-chat" version 0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin759 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP31718347
JavaScript2402221
CSS289191

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions16
▷ Named functions16100.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
3 PNG files occupy 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png19.86KB5.14KB▼ 74.11%
screenshot-3.png76.96KB23.15KB▼ 69.92%
screenshot-4.png12.42KB4.20KB▼ 66.15%