10% chatwing

Code Review | Plugin Name: Chatwing Live Group Chat - HTML5 + Chat Apps

WordPress plugin Plugin Name: Chatwing Live Group Chat - HTML5 + Chat Appsscored10%from 54 tests.

About plugin

  • Plugin page: chatwing
  • Plugin version: 2.4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 28, 2015
  • Latest release: Aug 13, 2018
  • Number of updates: 156
  • Update frequency: every 8.3 days
  • Top authors: tridungpham (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

10+ active /25,528 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Compile error in wp-content/plugins/chatwing/classes/DataModel.php+3
    Cannot use Chatwing\Object as Object because 'Object' is a special class name

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.04ms] Passed 4 tests

A check of server-side resources used by Plugin Name: Chatwing Live Group Chat - HTML5 + Chat Apps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.44 ▼5.71
Dashboard /wp-admin3.31 ▼0.0451.19 ▼22.83
Posts /wp-admin/edit.php3.36 ▲0.0050.79 ▲1.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.48 ▼13.10
Media Library /wp-admin/upload.php3.23 ▲0.0038.24 ▲1.47

Server storage [IO: ▲0.12MB] [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: 42 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Plugin Name: Chatwing Live Group Chat - HTML5 + Chat Apps: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.37 ▼0.232.78 ▲0.8845.91 ▲3.09
Dashboard /wp-admin2,198 ▲185.64 ▲0.0785.87 ▼12.6537.86 ▼7.70
Posts /wp-admin/edit.php2,103 ▲62.02 ▲0.0334.94 ▼4.6738.36 ▲6.10
Add New Post /wp-admin/post-new.php1,526 ▼523.56 ▲0.81718.91 ▲23.1463.44 ▲8.60
Media Library /wp-admin/upload.php1,400 ▼34.12 ▼0.05110.50 ▲9.5450.64 ▲3.54

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/chatwing/classes/index.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Chatwing\\Object' not found in wp-content/plugins/chatwing/chatwing-sdk/src/Chatwing/EndpointClient.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Chatwing\\Container' not found in wp-content/plugins/chatwing/chatwing-sdk/src/Chatwing/Application.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/chatwing/templates/new_token.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Chatwing\\Object' not found in wp-content/plugins/chatwing/chatwing-sdk/src/Chatwing/Api.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Chatwing\\Object' not found in wp-content/plugins/chatwing/chatwing-sdk/src/Chatwing/CustomSession.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Chatwing\\Application' not found in wp-content/plugins/chatwing/chatwing-sdk/src/Chatwing/start.php:18
    • > PHP Fatal error
      Cannot use 'Object' as class name as it is reserved in wp-content/plugins/chatwing/chatwing-sdk/src/Chatwing/Object.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Chatwing\\IntegrationPlugins\\WordPress\\DataModel' not found in wp-content/plugins/chatwing/templates/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Chatwing\\IntegrationPlugins\\WordPress\\PluginBase' not found in wp-content/plugins/chatwing/classes/Application.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/chatwing/chatwing.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (44 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin Name: Chatwing Live Group Chat - HTML5 + Chat Apps=== )
You can take inspiration from this readme.txt

chatwing/chatwing.php 92% from 13 tests

The entry point to "Plugin Name: Chatwing Live Group Chat - HTML5 + Chat Apps" version 2.4.5 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 201 characters long)

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
No dangerous file extensions were detected1,932 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP293765981,908
JSON10022
CSS20122

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.58
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods149
▷ Static methods1510.07%
▷ Public methods12986.58%
▷ Protected methods1912.75%
▷ Private methods10.67%
Functions15
▷ Named functions1173.33%
▷ Anonymous functions426.67%
Constants18
▷ Global constants1794.44%
▷ Class constants15.56%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sync-icon.png5.66KB5.92KB0.00%
assets/images/cw-logo-128x128.png3.09KB3.18KB0.00%