Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
- Install procedure had errors
- > Notice in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch.php+18
Undefined variable: mobilethemeswitch
Server metrics [RAM: ▼1.93MB] [CPU: ▼52.76ms] Passed 4 tests
Analyzing server-side resources used by Sub domain theme switch
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.06 ▼1.40 | 5.76 ▼44.10 |
Dashboard /wp-admin | 2.08 ▼1.22 | 8.81 ▼39.59 |
Posts /wp-admin/edit.php | 2.08 ▼1.28 | 8.16 ▼36.80 |
Add New Post /wp-admin/post-new.php | 2.08 ▼3.81 | 8.51 ▼90.55 |
Media Library /wp-admin/upload.php | 2.08 ▼1.15 | 6.88 ▼28.66 |
Subdomain theme /wp-admin/themes.php?page=subdomain-theme-switch | 2.08 | 7.67 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Sub domain theme switch
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.18 ▼1.20 | 4.81 ▲1.95 | 40.68 ▼2.32 |
Dashboard /wp-admin | 2,213 ▲25 | 4.90 ▼0.17 | 106.67 ▼8.19 | 41.26 ▼6.08 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.02 ▲0.03 | 40.15 ▲2.11 | 35.76 ▲2.57 |
Add New Post /wp-admin/post-new.php | 1,543 ▲10 | 22.05 ▼1.01 | 656.53 ▼22.23 | 60.19 ▲5.79 |
Media Library /wp-admin/upload.php | 1,392 ▲1 | 4.23 ▲0.05 | 93.94 ▼3.02 | 40.07 ▼4.42 |
Subdomain theme /wp-admin/themes.php?page=subdomain-theme-switch | 840 | 2.05 | 27.54 | 30.14 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch.php+18
Undefined variable: mobilethemeswitch
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- 4 occurences, only the last one shown
- > GET request to /wp-admin/themes.php?page=subdomain-theme-switch
- > Notice in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch.php+48
Undefined variable: mobilethemeswitch
- > GET request to /wp-admin/themes.php?page=subdomain-theme-switch
- > Notice in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch.php+41
Undefined index: SCRIPT_URI
- > GET request to /wp-admin/themes.php?page=subdomain-theme-switch
- > Notice in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch.php+44
Undefined index: host
- > GET request to /wp-admin/themes.php?page=subdomain-theme-switch
- > Notice in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch-admin.php+3
Undefined index: form_hidden
- > GET request to /wp-admin/themes.php?page=subdomain-theme-switch
- > User deprecated in wp-includes/functions.php+5453
Function get_themes is deprecated since version 3.4.0! Use wp_get_themes() instead.
- > GET request to /wp-admin/themes.php?page=subdomain-theme-switch
- > User deprecated in wp-includes/functions.php+5453
Function get_current_theme is deprecated since version 3.4.0! Use wp_get_theme() instead.
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch-admin.php:15
- > PHP Notice
Undefined index: form_hidden in wp-content/plugins/subdomain-theme-switch/subdomain-theme-switch-admin.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Screenshots: Add an image for screenshot #1 (screenshot-1.png)
subdomain-theme-switch/subdomain-theme-switch.php Passed 13 tests
"Sub domain theme switch" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
116 characters long description:
This plugin detects if your site is being viewed by a mobile browser and switches to an different, selectable theme.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected108 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 32 | 11 | 108 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.54 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 15.67KB | 5.81KB | ▼ 62.95% |