78% mqttchat

Code Review | MQTT CHAT Plugin

WordPress plugin MQTT CHAT Plugin scored78%from 54 tests.

About plugin

  • Plugin page: mqttchat
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7+
  • WordPress version: 6.3.1
  • First release: Sep 9, 2020
  • Latest release: Sep 3, 2022
  • Number of updates: 11
  • Update frequency: every 65.8 days
  • Top authors: medaboub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.75ms] Passed 4 tests

Server-side resources used by MQTT CHAT Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.35 ▼2.70
Dashboard /wp-admin3.33 ▲0.0242.40 ▼9.45
Posts /wp-admin/edit.php3.38 ▲0.0243.85 ▼2.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.31 ▼8.37
Media Library /wp-admin/upload.php3.25 ▲0.0233.43 ▼1.31
MqttChat /wp-admin/options-general.php?page=mqttchat-admin3.2431.53

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for MQTT CHAT Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.63 ▼0.684.74 ▲2.9637.95 ▼6.83
Dashboard /wp-admin2,210 ▲186.07 ▲1.11105.72 ▼4.1839.31 ▼3.70
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0338.77 ▲1.4834.66 ▼0.20
Add New Post /wp-admin/post-new.php1,536 ▲1723.24 ▼0.08585.19 ▼115.8147.75 ▼14.51
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.0595.56 ▼10.0941.97 ▲0.33
MqttChat /wp-admin/options-general.php?page=mqttchat-admin7882.0623.5725.29

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: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions 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/mqttchat/mqttchat.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/mqttchat/templates/admin.php:3

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6 in mqttchat/assets to your readme.txt
The official readme.txt is a good inspiration

mqttchat/mqttchat.php Passed 13 tests

The main file in "MQTT CHAT Plugin" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
99 characters long description:
MQTT CHAT is a chat module that can be easily integrated into your website or android application.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin140 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34829140

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected