73% wc-mqtt-alerts

Code Review | Alerts via MQQT for WooCommerce

WordPress plugin Alerts via MQQT for WooCommerce scored 73% from 54 tests.

About plugin

  • Plugin page: wc-mqtt-alerts
  • Plugin version: 0.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 5.8.1
  • First release: Jun 24, 2020
  • Latest release: Jun 26, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: yknivag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 208 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼141.95ms] Passed 4 tests

Analyzing server-side resources used by Alerts via MQQT for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0534.92 ▼7.26
Dashboard /wp-admin3.11 ▲0.0646.14 ▼2.34
Posts /wp-admin/edit.php3.16 ▲0.0655.65 ▲3.98
Add New Post /wp-admin/post-new.php5.47 ▲0.04108.12 ▼556.86
Media Library /wp-admin/upload.php3.06 ▲0.0537.66 ▼1.35

Server storage [IO: ▲0.03MB] [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: 3 new files
Database: no new tables, 1 new option
New WordPress options
wooshiftrmqtt_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Alerts via MQQT for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲15115.79 ▲0.5510.90 ▲2.1851.15 ▼3.07
Dashboard /wp-admin2,987 ▲535.92 ▼0.05168.68 ▼6.05121.52 ▼1.89
Posts /wp-admin/edit.php2,759 ▲202.72 ▲0.0068.26 ▼11.4897.12 ▲1.47
Add New Post /wp-admin/post-new.php1,696 ▲11515.79 ▼1.81431.38 ▼42.44116.01 ▼0.03
Media Library /wp-admin/upload.php1,827 ▲205.06 ▲0.04179.55 ▼25.19123.27 ▼4.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'iaml_deactivate' not found or invalid function name
  • Zombie WordPress options were found after uninstall: 1 option
    • wooshiftrmqtt_options

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/wc-mqtt-alerts/mqtt-woocommerce-notifier.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: notify, shiftrio, mqtt, notifier, woocommerce

wc-mqtt-alerts/mqtt-woocommerce-notifier.php 77% from 13 tests

This is the main PHP file of "Alerts via MQQT for WooCommerce" version 0.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.2" instead of "4.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-mqtt-alerts.php" instead of "mqtt-woocommerce-notifier.php")

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
Success! There were no dangerous files found in this plugin231 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12931231

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.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