Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- This plugin did not install gracefully
- > User deprecated in wp-includes/functions.php+5453
Function get_themes is deprecated since version 3.4.0! Use wp_get_themes() instead.
Server metrics [RAM: ▼1.82MB] [CPU: ▼57.65ms] Passed 4 tests
Server-side resources used by MTS 2 - Mobile Theme Switcher 2
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.16 ▼1.30 | 5.08 ▼37.65 |
Dashboard /wp-admin | 2.18 ▼1.12 | 7.07 ▼43.63 |
Posts /wp-admin/edit.php | 2.18 ▼1.17 | 6.93 ▼41.12 |
Add New Post /wp-admin/post-new.php | 2.18 ▼3.70 | 7.70 ▼108.18 |
Media Library /wp-admin/upload.php | 2.18 ▼1.05 | 7.63 ▼28.22 |
Mobile Theme Switcher /wp-admin/themes.php?page=mobile-theme-switcher-2 | 2.33 | 6.64 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
mts2_basics |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for MTS 2 - Mobile Theme Switcher 2
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 13.34 ▼0.91 | 1.71 ▼0.08 | 36.37 ▼9.88 |
Dashboard /wp-admin | 2,210 ▲19 | 4.88 ▼0.00 | 112.10 ▲8.59 | 41.99 ▲1.57 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.06 ▲0.04 | 39.67 ▲5.92 | 35.78 ▲4.09 |
Add New Post /wp-admin/post-new.php | 1,535 ▲21 | 23.45 ▲5.97 | 592.03 ▼91.96 | 52.33 ▼16.66 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.20 ▼0.01 | 95.55 ▼13.64 | 41.64 ▼6.60 |
Mobile Theme Switcher /wp-admin/themes.php?page=mobile-theme-switcher-2 | 1,142 | 2.00 | 36.52 | 29.32 |
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
These items require your attention
- Uninstall procedure had uncaught errors
- > User deprecated in wp-includes/functions.php+5453
Function get_themes is deprecated since version 3.4.0! Use wp_get_themes() instead.
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_recent-comments
- widget_recent-posts
- mts2_basics
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
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
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/themes.php?page=mobile-theme-switcher-2
- > User deprecated in wp-includes/functions.php+5453
Function get_themes is deprecated since version 3.4.0! Use wp_get_themes() instead.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/themes.php?page=mobile-theme-switcher-2
- > Notice in wp-content/plugins/mobile-theme-switcher-2/mobile-theme-switcher.php+203
Undefined index: mobile
- > GET request to /wp-admin/themes.php?page=mobile-theme-switcher-2
- > Notice in wp-content/plugins/mobile-theme-switcher-2/mobile-theme-switcher.php+221
Undefined variable: usermobileoff
- > GET request to /wp-admin/themes.php?page=mobile-theme-switcher-2
- > Notice in wp-content/plugins/mobile-theme-switcher-2/mobile-theme-switcher.php+221
Undefined index:
- > GET request to /wp-admin/themes.php?page=mobile-theme-switcher-2
- > Warning in wp-content/plugins/mobile-theme-switcher-2/mobile-theme-switcher.php+223
Invalid argument supplied for foreach()
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
The following issues need your attention
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/mobile-theme-switcher-2/mobile-theme-switcher.php:360
- > PHP Fatal error
Uncaught Error: Call to undefined function mts2_set_lang_file() in wp-content/plugins/mobile-theme-switcher-2/mobile-theme-switcher-admin.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
- Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
mobile-theme-switcher-2/mobile-theme-switcher.php 92% from 13 tests
The entry point to "MTS 2 - Mobile Theme Switcher 2" version 0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("mobile-theme-switcher-2.php" instead of "mobile-theme-switcher.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected262 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 74 | 110 | 221 |
PO File | 1 | 25 | 47 | 41 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 27.00 |
▷ Minimum class complexity | 27.00 |
▷ Maximum class complexity | 27.00 |
Average method complexity | 2.37 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.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 | 19 | |
▷ Static methods | 1 | 5.26% |
▷ Public methods | 19 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.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
PNG images were not found in this plugin