Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼6.48ms] Passed 4 tests
Analyzing server-side resources used by Yoctopuce Sensors
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.02 | 41.10 ▲3.50 |
Dashboard /wp-admin | 3.34 ▼0.01 | 43.51 ▼18.20 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 48.62 ▼3.84 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 91.11 ▼6.16 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 35.37 ▲2.29 |
Yocto-Sensor /wp-admin/options-general.php?page=ysensor | 3.20 | 29.96 |
Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_ysensor |
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
ysensor_option_version |
Browser metrics Passed 4 tests
A check of browser resources used by Yoctopuce Sensors
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.61 ▼0.59 | 1.82 ▲0.10 | 43.83 ▼0.81 |
Dashboard /wp-admin | 2,207 ▲16 | 5.84 ▲0.95 | 95.98 ▼8.66 | 39.88 ▼0.81 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.00 ▼0.06 | 39.49 ▼4.79 | 36.31 ▲1.31 |
Add New Post /wp-admin/post-new.php | 1,538 ▲5 | 23.17 ▲0.07 | 598.21 ▼3.79 | 53.56 ▲4.82 |
Media Library /wp-admin/upload.php | 1,392 ▲1 | 4.16 ▼0.03 | 95.61 ▼7.93 | 41.90 ▼2.86 |
Yocto-Sensor /wp-admin/options-general.php?page=ysensor | 784 | 2.06 | 24.73 | 24.06 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 failed, leaving 1 table in the database
- wp_ysensor
- This plugin does not fully uninstall, leaving 7 options in the database
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- ysensor_option_version
- can_compress_scripts
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=ysensor
- > Notice in wp-content/plugins/yoctopuce-sensors/inc/admin_options.php+31
Trying to access array offset on value of type bool
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/yoctopuce-sensors/inc/load.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/yoctopuce-sensors/inc/load.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/yoctopuce-sensors/inc/http_callback.php:13
- > PHP Notice
Undefined variable: wpdb in wp-content/plugins/yoctopuce-sensors/inc/http_callback.php on line 10
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/yoctopuce-sensors/inc/http_callback.php on line 10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% 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
1 plugin tags: sensor iot
yoctopuce-sensors/yocto-sensor.php 85% from 13 tests
The main PHP file in "Yoctopuce Sensors" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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 ("yoctopuce-sensors.php" instead of "yocto-sensor.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin5,375 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 549 | 2,502 | 5,375 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 104)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 64.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 314.00 |
Average method complexity | 3.99 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 104.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 16 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 16 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 339 | |
▷ Static methods | 74 | 21.83% |
▷ Public methods | 326 | 96.17% |
▷ Protected methods | 10 | 2.95% |
▷ Private methods | 3 | 0.88% |
Functions | 30 | |
▷ Named functions | 30 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 153 | |
▷ Global constants | 96 | 62.75% |
▷ Class constants | 57 | 37.25% |
▷ Public constants | 57 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin