Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.15MB] [CPU: ▼135.42ms] Passed 4 tests
This is a short check of server-side resources used by MDC Theme Switcher
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.97 ▲0.13 | 59.14 ▲25.34 |
Dashboard /wp-admin | 3.28 ▲0.22 | 54.01 ▲8.40 |
Posts /wp-admin/edit.php | 3.33 ▲0.22 | 56.42 ▲8.59 |
Add New Post /wp-admin/post-new.php | 5.54 ▲0.11 | 95.88 ▼560.56 |
Media Library /wp-admin/upload.php | 3.14 ▲0.14 | 35.74 ▲1.90 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 3 new options
New WordPress options |
---|
mdc_theme_switcher |
current_theme |
theme_switched |
Browser metrics Passed 4 tests
This is an overview of browser requirements for MDC Theme Switcher
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,086 ▲490 | 17.96 ▲2.42 | 12.31 ▲3.38 | 49.00 ▼0.02 |
Dashboard /wp-admin | 3,192 ▲258 | 8.20 ▲2.26 | 159.66 ▲14.40 | 128.49 ▲9.13 |
Posts /wp-admin/edit.php | 3,018 ▲279 | 4.40 ▲1.71 | 83.43 ▲16.75 | 125.47 ▲31.90 |
Add New Post /wp-admin/post-new.php | 1,712 ▲29 | 18.05 ▼0.72 | 350.74 ▼37.67 | 116.53 ▼4.41 |
Media Library /wp-admin/upload.php | 1,864 ▲57 | 4.89 ▼0.13 | 116.02 ▼41.20 | 143.66 ▲21.75 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 2 options in the database
- current_theme
- theme_switched
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mdc-theme-switcher/admin/class.settings-api.php:30
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mdc-theme-switcher/admin/class.settings-api.php:30
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: activate, mdc, theme switch, switch, preview...
mdc-theme-switcher/mdc-theme-switcher.php Passed 13 tests
The principal PHP file in "MDC Theme Switcher" v. 3.1.0 is loaded by WordPress automatically on each request
101 characters long description:
MDC Theme Switcher allows to change and preview among available themes of a WordPress from front-end.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin748 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 156 | 215 | 630 |
CSS | 1 | 1 | 5 | 83 |
JavaScript | 1 | 4 | 0 | 35 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 22.00 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 49.00 |
Average method complexity | 2.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 45 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 45 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/icon.png | 4.00KB | 1.26KB | ▼ 68.59% |