Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▼0.68MB] [CPU: ▼26.99ms] Passed 4 tests
An overview of server-side resources used by Mobile Switcher
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.68 ▲0.22 | 46.73 ▲5.55 |
Dashboard /wp-admin | 3.26 ▼0.04 | 29.11 ▼15.21 |
Posts /wp-admin/edit.php | 3.26 ▼0.10 | 26.92 ▼16.08 |
Add New Post /wp-admin/post-new.php | 3.26 ▼2.63 | 25.09 ▼67.37 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 24.97 ▼9.29 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 10 new options
New WordPress options |
---|
ms_mobile_template |
ms_desktop_template |
can_compress_scripts |
mobile_switcher_enabled |
ms_tablet_template |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
Mobile Switcher: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,924 ▲167 | 13.92 ▼0.48 | 5.23 ▲3.17 | 38.31 ▼6.11 |
Dashboard /wp-admin | 2,222 ▲33 | 5.91 ▲1.01 | 107.09 ▼5.93 | 41.57 ▲4.54 |
Posts /wp-admin/edit.php | 2,105 ▲13 | 2.02 ▼0.03 | 39.40 ▼3.81 | 34.67 ▼4.15 |
Add New Post /wp-admin/post-new.php | 1,528 ▼14 | 23.23 ▲5.16 | 663.42 ▲64.13 | 65.73 ▲12.09 |
Media Library /wp-admin/upload.php | 1,407 ▲22 | 4.25 ▲0.05 | 98.16 ▲2.00 | 40.54 ▼0.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- 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.
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 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
Please take a closer look at the following
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/mobile-switcher/public/partials/mobile-switcher-public-display.php
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/mobile-switcher/admin/partials/plugin-mobile-switcher-display.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
- Screenshots: Screenshot #1 (= 1.0.0 =) image not found
mobile-switcher/mobile-switcher.php Passed 13 tests
"Mobile Switcher" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
61 characters long description:
This plugin allow to set themes for mobile phones and tablets
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin956 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 248 | 1,162 | 944 |
CSS | 2 | 2 | 8 | 6 |
JavaScript | 2 | 4 | 54 | 6 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.56 |
Average class complexity | 17.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 123.00 |
Average method complexity | 3.02 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 77.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 65 | |
▷ Static methods | 11 | 16.92% |
▷ Public methods | 58 | 89.23% |
▷ Protected methods | 2 | 3.08% |
▷ Private methods | 5 | 7.69% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 1 | 10.00% |
▷ Class constants | 9 | 90.00% |
▷ Public constants | 9 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin