83% wise-chat

Code Review | Wise Chat

WordPress plugin Wise Chat scored83%from 54 tests.

About plugin

  • Plugin page: wise-chat
  • Plugin version: 3.1.7
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 6, 2014
  • Latest release: Oct 15, 2023
  • Number of updates: 95
  • Update frequency: every 34.1 days
  • Top authors: marcin.lawrowski (100%)

Code review

54 tests

User reviews

101 reviews

Install metrics

9,000+ active /356,504 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
Install script ran successfully

Server metrics [RAM: ▲1.86MB] [CPU: ▲8.83ms] Passed 4 tests

Analyzing server-side resources used by Wise Chat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.46 ▲1.0046.75 ▲5.21
Dashboard /wp-admin5.50 ▲2.2060.12 ▲13.31
Posts /wp-admin/edit.php5.55 ▲2.1965.35 ▲20.97
Add New Post /wp-admin/post-new.php8.02 ▲2.1393.79 ▼2.94
Media Library /wp-admin/upload.php5.34 ▲2.1157.03 ▲19.74
Wise Chat Settings /wp-admin/options-general.php?page=wise-chat-admin5.3456.15

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 683 new files
Database: 7 new tables, 9 new options
New tables
wp_wise_chat_bans
wp_wise_chat_messages
wp_wise_chat_users
wp_wise_chat_channels
wp_wise_chat_kicks
wp_wise_chat_channel_users
wp_wise_chat_actions
New WordPress options
wise_chat_options_name
wise_chat_last_name_id
widget_recent-posts
widget_wisechatwidget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Wise Chat
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,295 ▲53418.36 ▲3.6016.37 ▲14.5342.36 ▼4.94
Dashboard /wp-admin2,468 ▲2907.56 ▲2.00134.54 ▲34.3838.91 ▼1.25
Posts /wp-admin/edit.php2,393 ▲2905.25 ▲3.2857.96 ▲23.0831.17 ▼0.94
Add New Post /wp-admin/post-new.php6,496 ▲4,96830.65 ▲7.69935.16 ▲248.9439.06 ▼16.21
Media Library /wp-admin/upload.php1,530 ▲1305.40 ▲1.17101.96 ▲2.5346.49 ▲2.87
Wise Chat Settings /wp-admin/options-general.php?page=wise-chat-admin9,3335.96136.7697.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_wisechatwidget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following items
  • 37× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatAbstractTab' not found in wp-content/plugins/wise-chat/src/admin/WiseChatChannelsTab.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatAbstractTab' not found in wp-content/plugins/wise-chat/src/admin/WiseChatBansTab.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatAbstractCommand' not found in wp-content/plugins/wise-chat/src/commands/WiseChatUnbanCommand.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatContainer' not found in wp-content/plugins/wise-chat/src/endpoints/WiseChatEndpoint.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatAbstractTab' not found in wp-content/plugins/wise-chat/src/admin/WiseChatLocalizationTab.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatAbstractTab' not found in wp-content/plugins/wise-chat/src/admin/WiseChatGeneralTab.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatAbstractTab' not found in wp-content/plugins/wise-chat/src/admin/WiseChatAppearanceTab.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wise-chat/src/WiseChatWidget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatContainer' not found in wp-content/plugins/wise-chat/src/commands/WiseChatCommandsResolver.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WiseChatAbstractCommand' not found in wp-content/plugins/wise-chat/src/commands/WiseChatBanCommand.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 37 tag instead of maximum 10
The official readme.txt might help

wise-chat/wise-chat-core.php 85% from 13 tests

"Wise Chat" version 3.1.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 166 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wise-chat.php" instead of "wise-chat-core.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected102,982 lines of code in 296 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3513,2799,32556,659
JSON60023,571
PHP1072,2784,17110,371
CSS61641044,255
Sass26719323,239
JSX43562393,109
SVG710641,715
Markdown122056
XML1007

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.86
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes104
▷ Abstract classes21.92%
▷ Concrete classes10298.08%
▷ Final classes00.00%
Methods817
▷ Static methods576.98%
▷ Public methods67882.99%
▷ Protected methods323.92%
▷ Private methods10713.10%
Functions33
▷ Named functions2266.67%
▷ Anonymous functions1133.33%
Constants48
▷ Global constants48.33%
▷ Class constants4491.67%
▷ Public constants44100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
293 compressed PNG files occupy 1.85MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gfx/flags/mt.png0.41KB0.57KB0.00%
gfx/flags/za.png0.63KB0.75KB0.00%
gfx/flags/ae.png0.40KB0.54KB0.00%
gfx/flags/dz.png0.57KB0.65KB0.00%
assets/screenshot-06.png72.88KB24.45KB▼ 66.45%