Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.23MB] [CPU: ▼2.84ms] 75% from 4 tests
This is a short check of server-side resources used by Control Shelly Devices
Please have a look at the following items
- CPU: Total CPU usage should be kept under 500.00ms (currently 675.94ms on /wp-admin/admin.php?page=mcisc-help)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.67 ▲0.21 | 42.47 ▲3.62 |
Dashboard /wp-admin | 3.56 ▲0.22 | 50.92 ▼14.13 |
Posts /wp-admin/edit.php | 3.65 ▲0.29 | 47.58 ▲3.02 |
Add New Post /wp-admin/post-new.php | 6.14 ▲0.25 | 86.34 ▼3.88 |
Media Library /wp-admin/upload.php | 3.46 ▲0.23 | 40.04 ▲5.49 |
WP Shelly Control /wp-admin/admin.php?page=wp-shelly-control | 3.69 | 722.41 |
Help /wp-admin/admin.php?page=mcisc-help | 3.46 | 675.94 |
Settings /wp-admin/admin.php?page=mcisc-settings | 3.61 | 311.54 |
Server storage [IO: ▲1.15MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 10 new options
New WordPress options |
---|
widget_recent-posts |
mcisc_version |
widget_theysaidso_widget |
mcisc_auth_premium |
mcisc_options |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
mcisc_encryption_key |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Control Shelly Devices
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,925 ▲163 | 13.51 ▼0.85 | 8.57 ▲6.97 | 44.49 ▲8.34 |
Dashboard /wp-admin | 2,242 ▲65 | 5.65 ▲0.13 | 84.53 ▼16.31 | 38.22 ▼8.33 |
Posts /wp-admin/edit.php | 2,147 ▲44 | 2.04 ▲0.02 | 38.50 ▲1.36 | 31.85 ▼1.52 |
Add New Post /wp-admin/post-new.php | 1,569 ▲39 | 23.13 ▼0.21 | 673.80 ▲6.03 | 52.68 ▼1.33 |
Media Library /wp-admin/upload.php | 1,441 ▲41 | 4.21 ▼0.01 | 99.53 ▼8.35 | 42.18 ▼4.66 |
WP Shelly Control /wp-admin/admin.php?page=wp-shelly-control | 946 | 2.11 | 26.99 | 30.75 |
Help /wp-admin/admin.php?page=mcisc-help | 908 | 1.66 | 22.61 | 33.09 |
Settings /wp-admin/admin.php?page=mcisc-settings | 938 | 1.70 | 24.22 | 46.91 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- The uninstall procedure has failed, leaving 10 options in the database
- mcisc_auth_premium
- can_compress_scripts
- mcisc_version
- widget_theysaidso_widget
- widget_recent-posts
- mcisc_options
- db_upgraded
- theysaidso_admin_options
- mcisc_encryption_key
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
- > GET request to /wp-admin/admin.php?page=wp-shelly-control
- > POST request to /wp-admin/admin-ajax.php
- > Warning in wp-content/plugins/wp-shelly-control/devices/ajax/AjaxReloadStatus.php+47
Invalid argument supplied for foreach()
SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files
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)
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: shelly cloud, iot, shelly, electronic control, automation...
wp-shelly-control/wp-shelly-control.php Passed 13 tests
"Control Shelly Devices" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
59 characters long description:
Control your Shelly remote devices from your WordPress site
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 plugin3,571 lines of code in 45 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 36 | 660 | 58 | 2,484 |
CSS | 5 | 20 | 13 | 905 |
JavaScript | 4 | 53 | 3 | 182 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 11.82 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 42.00 |
Average method complexity | 3.83 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 25.00 |
Code structure | ||
---|---|---|
Namespaces | 16 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 34 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 34 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 130 | |
▷ Static methods | 10 | 7.69% |
▷ Public methods | 109 | 83.85% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 21 | 16.15% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 8 | |
▷ Global constants | 8 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.97MB with 0.58MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
front/assets/img/power_ico.png | 1.50KB | 1.31KB | ▼ 13.11% |
front/assets/img/ok.png | 12.64KB | 2.02KB | ▼ 84.02% |
front/assets/img/control_shelly_account_2.png | 360.50KB | 113.99KB | ▼ 68.38% |
front/assets/img/control_shelly_account_1.png | 618.33KB | 163.04KB | ▼ 73.63% |