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
Install script ran successfully
Server metrics [RAM: ▼0.85MB] [CPU: ▼32.97ms] Passed 4 tests
A check of server-side resources used by MobiSwitch
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.10 | 39.40 ▲2.48 |
Dashboard /wp-admin | 3.10 ▼0.21 | 24.80 ▼24.73 |
Posts /wp-admin/edit.php | 3.10 ▼0.26 | 22.00 ▼21.86 |
Add New Post /wp-admin/post-new.php | 3.10 ▼2.79 | 23.19 ▼71.99 |
Media Library /wp-admin/upload.php | 3.10 ▼0.14 | 23.87 ▼13.28 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
MobiSwitch: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,830 ▲84 | 14.37 ▲0.01 | 1.88 ▲0.06 | 43.70 ▼0.42 |
Dashboard /wp-admin | 2,211 ▲31 | 5.59 ▼0.28 | 94.01 ▲5.51 | 42.88 ▲4.89 |
Posts /wp-admin/edit.php | 2,116 ▲13 | 2.01 ▲0.04 | 35.27 ▲1.82 | 30.77 ▼4.28 |
Add New Post /wp-admin/post-new.php | 1,538 ▲8 | 22.96 ▼0.18 | 648.64 ▼3.84 | 68.88 ▲12.92 |
Media Library /wp-admin/upload.php | 1,416 ▲13 | 4.19 ▲0.01 | 95.49 ▼2.31 | 41.90 ▼0.12 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The plugin did not uninstall gracefully
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 4× 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/mobiswitch/mobiswitch.php:35
- > PHP Fatal error
Uncaught Error: Call to undefined function status_header() in wp-content/plugins/mobiswitch/uninstall.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mobiswitch/mobiswitch_settings.php:23
- > PHP Notice
Undefined index: mobiswitch_hidden in wp-content/plugins/mobiswitch/mobiswitch_settings.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
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: mobile theme switcher, mobiswitch, theme switcher, mobile
mobiswitch/mobiswitch.php 92% from 13 tests
"MobiSwitch" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Description: Please keep the plugin description shorter than 140 characters (currently 181 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin505 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 172 | 304 | 505 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.95 |
Average class complexity | 105.00 |
▷ Minimum class complexity | 105.00 |
▷ Maximum class complexity | 105.00 |
Average method complexity | 5.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 58.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 25 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 23 | 92.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 8.00% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 1 | 100.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected