Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- The plugin cannot be installed
- > User notice in wp-includes/functions.php+5905
Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
Server metrics [RAM: ▼1.93MB] [CPU: ▼55.15ms] Passed 4 tests
Analyzing server-side resources used by Show Temperature for SwitchBot Meter
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.06 ▼1.41 | 5.29 ▼39.78 |
Dashboard /wp-admin | 2.08 ▼1.23 | 6.20 ▼43.67 |
Posts /wp-admin/edit.php | 2.08 ▼1.28 | 6.32 ▼40.30 |
Add New Post /wp-admin/post-new.php | 2.08 ▼3.81 | 6.92 ▼96.85 |
Media Library /wp-admin/upload.php | 2.08 ▼1.15 | 6.73 ▼30.10 |
Show SwitchBot Meter /wp-admin/options-general.php?page=sbm_setting_admin | 2.08 | 5.82 |
Server storage [IO: ▲2.67MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Show Temperature for SwitchBot Meter
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 14.44 ▲0.22 | 1.81 ▲0.00 | 43.51 ▼1.56 |
Dashboard /wp-admin | 2,213 ▲25 | 5.89 ▼0.03 | 106.66 ▲5.11 | 45.05 ▼1.73 |
Posts /wp-admin/edit.php | 2,096 ▲4 | 2.01 ▲0.02 | 40.47 ▼2.68 | 35.91 ▼1.12 |
Add New Post /wp-admin/post-new.php | 1,517 ▲3 | 17.64 ▲0.11 | 694.51 ▲39.27 | 58.43 ▲3.77 |
Media Library /wp-admin/upload.php | 1,392 ▲4 | 4.23 ▲0.01 | 98.65 ▼9.88 | 47.01 ▼3.33 |
Show SwitchBot Meter /wp-admin/options-general.php?page=sbm_setting_admin | 859 | 2.18 | 24.38 | 31.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- Uninstall procedure had uncaught errors
- > User notice in wp-includes/functions.php+5905
Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=sbm_setting_admin
- > User notice in wp-includes/functions.php+5905
Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=sbm_setting_admin
- > Notice in wp-content/plugins/show-temperature-for-switchbot-meter/settings.php+42
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
- 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Warning
include_once(): Failed opening '' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/show-temperature-for-switchbot-meter/rest/get_state.php on line 4
- > PHP Warning
include_once(wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes): failed to open stream: Resource temporarily unavailable in /var/www/wordpress/wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes/sc_humidity.php on line 4
- > PHP Notice
Undefined variable: attr in wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes/sc_image.php on line 10
- > PHP Warning
include_once(wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes): failed to open stream: Resource temporarily unavailable in /var/www/wordpress/wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes/sc_temperature.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes/sc_image.php:13
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/show-temperature-for-switchbot-meter/settings_admin_menu.php:162
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/show-temperature-for-switchbot-meter/settings_admin_init.php:122
- > PHP Notice
Undefined variable: attr in wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes/sc_humidity.php on line 7
- > PHP Warning
include_once(): Failed opening '' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes/sc_humidity.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/show-temperature-for-switchbot-meter/shortcodes/sc_humidity.php:10
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 96% 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
4 plugin tags: meter, temperature, switchbot, humidity
show-temperature-for-switchbot-meter/show-temperature-for-switchbot-meter.php 92% from 13 tests
"Show Temperature for SwitchBot Meter" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected9,854 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 5 | 100 | 5 | 9,097 |
PHP | 13 | 128 | 54 | 579 |
PO File | 1 | 26 | 28 | 120 |
CSS | 1 | 13 | 10 | 40 |
JavaScript | 1 | 4 | 0 | 16 |
Markdown | 1 | 1 | 0 | 2 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 3.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 1.49 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 39 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 32 | 82.05% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 7 | 17.95% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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