78% misterchat

Code Review | MisterChat

WordPress plugin MisterChat scored78%from 54 tests.

About plugin

  • Plugin page: misterchat
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2022
  • Latest release: Nov 23, 2022
  • Number of updates: 31
  • Update frequency: every 1.7 days
  • Top authors: helemaaldebom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,694 total downloads

Benchmarks

Plugin footprint 83% 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.08MB] [CPU: ▼7.05ms] Passed 4 tests

An overview of server-side resources used by MisterChat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0627.72 ▼12.69
Dashboard /wp-admin3.39 ▲0.0946.71 ▼3.14
Posts /wp-admin/edit.php3.51 ▲0.1550.86 ▼2.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0989.97 ▼10.00
Media Library /wp-admin/upload.php3.32 ▲0.0938.97 ▼2.38

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
mister_chat_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for MisterChat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲91714.27 ▼0.0851.54 ▲49.9140.88 ▼1.54
Dashboard /wp-admin2,214 ▲345.51 ▼0.1685.63 ▼4.6880.49 ▲35.82
Posts /wp-admin/edit.php2,119 ▲162.00 ▼0.0439.10 ▼5.7537.30 ▼4.02
Add New Post /wp-admin/post-new.php1,543 ▲1723.12 ▼0.43731.56 ▲53.9554.10 ▲0.51
Media Library /wp-admin/upload.php1,416 ▲134.14 ▼0.11107.78 ▼2.0278.40 ▲33.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • mister_chat_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/misterchat/public/partials/mister_chat-public-display.php
    • > /wp-content/plugins/misterchat/admin/partials/mister_chat-admin-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/misterchat/admin/class-mister_chat-admin.php:340

User-side errors Passed 1 test

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

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:
  • Screenshots: These screenshots need descriptions #4, #5, #6, #7 in misterchat/assets to your readme.txt
Please take inspiration from this readme.txt

misterchat/mister_chat.php 85% from 13 tests

"MisterChat" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("misterchat.php" instead of "mister_chat.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected462 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13188574336
PO File1212796
CSS33824
JavaScript22306

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png36.13KB10.48KB▼ 71.00%
assets/screenshot-1.png98.78KB31.10KB▼ 68.51%
admin/images/mister_chat.png0.45KB0.59KB0.00%
admin/images/mister_logo.png39.86KB13.00KB▼ 67.39%