Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▼1.42ms] Passed 4 tests
An overview of server-side resources used by hiWeb Theme Switcher
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 35.48 ▼1.11 |
Dashboard /wp-admin | 3.33 ▲0.02 | 42.66 ▼2.71 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 44.69 ▼1.43 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 89.57 ▲9.45 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 34.95 ▼0.41 |
hiWeb Theme Switcher /wp-admin/edit.php?post_type=hw_theme_switcher | 3.29 | 34.06 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for hiWeb Theme Switcher
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,835 ▲89 | 13.28 ▼1.09 | 1.99 ▲0.39 | 38.51 ▲0.59 |
Dashboard /wp-admin | 2,210 ▲55 | 5.79 ▲0.08 | 95.19 ▲0.33 | 40.00 ▲2.16 |
Posts /wp-admin/edit.php | 2,093 ▲1 | 2.00 ▼0.16 | 33.68 ▼7.18 | 34.43 ▼5.27 |
Add New Post /wp-admin/post-new.php | 1,520 ▲6 | 17.41 ▼0.10 | 623.27 ▼31.00 | 58.63 ▼0.67 |
Media Library /wp-admin/upload.php | 1,395 ▲4 | 4.19 ▲0.03 | 95.84 ▼3.48 | 40.87 ▼2.16 |
hiWeb Theme Switcher /wp-admin/edit.php?post_type=hw_theme_switcher | 1,060 | 1.95 | 32.18 | 28.72 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
- 10× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/hiweb-theme-switcher/templates/meta_boxes_post_types.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/hiweb-theme-switcher/templates/meta_boxes_post_ids.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-theme-switcher/inc/post-type.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-theme-switcher/inc/ajax.php:4
- > PHP Warning
Use of undefined constant HW_THEME_SWITCHER_PREFIX - assumed 'HW_THEME_SWITCHER_PREFIX' (this will throw an Error in a future version of PHP) in wp-content/plugins/hiweb-theme-switcher/templates/meta_boxes_post_ids.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-theme-switcher/inc/post-type.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/hiweb-theme-switcher/templates/meta_boxes_theme_id.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/hiweb-theme-switcher/templates/meta_boxes_theme_id.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function hw_theme_switcher() in wp-content/plugins/hiweb-theme-switcher/inc/columns.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-theme-switcher/inc/meta-boxes.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% 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
Please fix the following attributes:
- Donate link: Please fix this invalid URI: ""
- Screenshots: These screenshots require images: #1 (List of rules), #2 (Admin rule), #3 (Markers indicating the pages and posts with a modified theme)
hiweb-theme-switcher/hiweb-theme-switcher.php Passed 13 tests
The main PHP script in "hiWeb Theme Switcher" version 1.0.1.0 is automatically included on every request by WordPress
46 characters long description:
Changing the theme on selected pages and posts
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 plugin430 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 81 | 115 | 332 |
JavaScript | 3 | 7 | 4 | 54 |
CSS | 2 | 7 | 1 | 44 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.54 |
Average class complexity | 52.00 |
▷ Minimum class complexity | 52.00 |
▷ Maximum class complexity | 52.00 |
Average method complexity | 6.10 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 33.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 | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.16MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 66.31KB | 34.27KB | ▼ 48.32% |
screenshot-1.png | 42.21KB | 21.86KB | ▼ 48.22% |
asset/chosen-sprite@2x.png | 0.72KB | 0.83KB | 0.00% |
asset/chosen-sprite.png | 0.53KB | 0.88KB | 0.00% |
screenshot-3.png | 54.24KB | 28.92KB | ▼ 46.67% |