10% wp-mqtt

Code Review | WP-MQTT

WordPress plugin WP-MQTT scored10%from 54 tests.

About plugin

  • Plugin page: wp-mqtt
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4
  • WordPress version: 6.3.1
  • First release: Nov 9, 2016
  • Latest release: Mar 13, 2020
  • Number of updates: 14
  • Update frequency: every 86.9 days
  • Top authors: roytanck (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /4,110 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-mqtt/lib/vendor/phpMQTT/phpMQTT.php+133
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.83MB] [CPU: ▼51.11ms] Passed 4 tests

A check of server-side resources used by WP-MQTT
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.307.12 ▼34.54
Dashboard /wp-admin2.18 ▼1.1211.52 ▼40.43
Posts /wp-admin/edit.php2.18 ▼1.178.33 ▼41.01
Add New Post /wp-admin/post-new.php2.18 ▼3.708.05 ▼88.46
Media Library /wp-admin/upload.php2.18 ▼1.055.69 ▼31.69
WP-MQTT /wp-admin/options-general.php?page=wp-mqtt-settings2.186.00

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP-MQTT
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.19 ▼1.374.81 ▲2.6244.46 ▼0.17
Dashboard /wp-admin2,207 ▲195.83 ▼0.0799.81 ▼15.1739.81 ▼1.99
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0039.94 ▼1.8634.23 ▼5.16
Add New Post /wp-admin/post-new.php1,533 ▲1918.53 ▲0.91624.22 ▼28.6353.31 ▼2.68
Media Library /wp-admin/upload.php1,392 ▲134.22 ▼0.0992.58 ▼8.6941.79 ▼1.76
WP-MQTT /wp-admin/options-general.php?page=wp-mqtt-settings1,2001.8027.7932.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-mqtt/lib/vendor/phpMQTT/phpMQTT.php+133
    Array and string offset access syntax with curly braces is deprecated
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-mqtt-settings
    • > Deprecated in wp-content/plugins/wp-mqtt/lib/vendor/phpMQTT/phpMQTT.php+406
    Array and string offset access syntax with curly braces is deprecated

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      fsockopen(): unable to connect to 93.184.216.34:1883 (Connection timed out) in wp-content/plugins/wp-mqtt/lib/vendor/phpMQTT/phpMQTT.php on line 78

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: mqtt, internet-of-things, iot

wp-mqtt/wp-mqtt.php 92% from 13 tests

The main file in "WP-MQTT" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin893 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6234203856
JavaScript111523
JSON11014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity32.00
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin