84% ecava-diot-scada

Code Review | DIOT SCADA with MQTT

WordPress plugin DIOT SCADA with MQTT scored84%from 54 tests.

About plugin

  • Plugin page: ecava-diot-scada
  • Plugin version: 1.0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.3-4.8
  • WordPress version: 6.3.1
  • First release: May 8, 2017
  • Latest release: Jul 28, 2017
  • Number of updates: 22
  • Update frequency: every 3.8 days
  • Top authors: scada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.78ms] Passed 4 tests

Server-side resources used by DIOT SCADA with MQTT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.01 ▼2.64
Dashboard /wp-admin3.36 ▲0.0152.04 ▼9.13
Posts /wp-admin/edit.php3.41 ▲0.0547.19 ▼5.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.16 ▼13.73
Media Library /wp-admin/upload.php3.28 ▲0.0536.48 ▲0.18

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for DIOT SCADA with MQTT
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13513.61 ▼0.6913.01 ▲11.3442.42 ▼1.81
Dashboard /wp-admin2,213 ▲365.52 ▼0.1087.91 ▼2.4178.20 ▲37.68
Posts /wp-admin/edit.php2,115 ▲152.14 ▲0.0935.29 ▼2.6533.90 ▼3.19
Add New Post /wp-admin/post-new.php1,553 ▲2423.18 ▲5.63735.26 ▲110.4950.26 ▼4.81
Media Library /wp-admin/upload.php1,418 ▲184.19 ▼0.0495.42 ▼12.4185.14 ▲36.73

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 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/ecava-diot-scada/menu/settings.php:12

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: scada, iot, control, automation, mqtt...

ecava-diot-scada/ecava_diot_scada.php 92% from 13 tests

The primary PHP file in "DIOT SCADA with MQTT" version 1.0.5.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ecava-diot-scada.php" instead of "ecava_diot_scada.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 detected4,748 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript69271,0344,321
PHP57070271
SVG111156

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods133.33%
▷ Protected methods00.00%
▷ Private methods266.67%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.28MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png19.50KB8.05KB▼ 58.70%
assets/icon-256x256.png12.99KB5.88KB▼ 54.71%
assets/banner-1544x500.png167.25KB61.29KB▼ 63.35%
assets/banner-772x250.png76.80KB28.52KB▼ 62.86%
assets/icon-128x128.png6.32KB3.14KB▼ 50.28%