Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.66MB] [CPU: ▼1.89ms] Passed 4 tests
An overview of server-side resources used by Switch Core
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.17 ▲0.71 | 46.49 ▲6.00 |
Dashboard /wp-admin | 4.00 ▲0.69 | 51.61 ▲0.52 |
Posts /wp-admin/edit.php | 4.05 ▲0.69 | 53.73 ▲7.59 |
Add New Post /wp-admin/post-new.php | 6.52 ▲0.63 | 84.96 ▼21.67 |
Media Library /wp-admin/upload.php | 3.86 ▲0.63 | 48.53 ▲14.69 |
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins | 3.93 | 34.45 |
Server storage [IO: ▲2.69MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 78 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Switch Core
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,215 ▲458 | 14.30 ▼0.35 | 22.06 ▲20.07 | 68.13 ▲18.14 |
Dashboard /wp-admin | 2,246 ▲55 | 5.83 ▲0.95 | 107.88 ▲1.26 | 42.49 ▼0.02 |
Posts /wp-admin/edit.php | 2,140 ▲54 | 2.07 ▲0.06 | 40.27 ▲4.04 | 40.95 ▲7.90 |
Add New Post /wp-admin/post-new.php | 1,567 ▲34 | 23.38 ▲0.46 | 661.20 ▼4.26 | 62.23 ▲13.74 |
Media Library /wp-admin/upload.php | 1,439 ▲54 | 4.23 ▲0.02 | 102.41 ▼0.96 | 46.60 ▲0.58 |
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins | 1,064 | 2.05 | 23.43 | 28.20 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
Please take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/switch-core/customizer-repeater/inc/icons.php
- 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/switch-core/inc/sections-customizer.php:1793
- > PHP Warning
require_once(SWITCH_CORE_FILE_PATH/customizer-repeater/inc/customizer.php): failed to open stream: No such file or directory in wp-content/plugins/switch-core/customizer-repeater/functions.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/switch-core/customizer-repeater/inc/customizer.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/switch-core/inc/sections/section-testimonial.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function did_action() in wp-content/plugins/switch-core/inc/class-tgm-plugin-activation.php:2016
- > PHP Fatal error
Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/switch-core/inc/sections/section-team.php:2
- > PHP Fatal error
require_once(): Failed opening required 'SWITCH_CORE_FILE_PATH/customizer-repeater/inc/customizer.php' (include_path='.:/usr/share/php') in wp-content/plugins/switch-core/customizer-repeater/functions.php on line 3
- > PHP Warning
Use of undefined constant SWITCH_CORE_FILE_PATH - assumed 'SWITCH_CORE_FILE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/switch-core/customizer-repeater/functions.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/switch-core/inc/sections/section-about.php:4
- > PHP Fatal error
Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/switch-core/customizer-repeater/class/customizer-repeater-control.php:6
- > 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 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
Attributes that require attention:
- Tags: You are using too many tags: 13 tag instead of maximum 10
switch-core/switch-core.php 92% from 13 tests
This is the main PHP file of "Switch Core" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 186 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected29,291 lines of code in 46 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 10 | 609 | 161 | 16,948 |
JavaScript | 13 | 137 | 35 | 6,392 |
PHP | 19 | 1,014 | 1,837 | 4,529 |
SVG | 3 | 0 | 0 | 1,357 |
Markdown | 1 | 18 | 0 | 65 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 44.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 195.00 |
Average method complexity | 4.51 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 112 | |
▷ Static methods | 6 | 5.36% |
▷ Public methods | 82 | 73.21% |
▷ Protected methods | 23 | 20.54% |
▷ Private methods | 7 | 6.25% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 3 | 50.00% |
▷ Class constants | 3 | 50.00% |
▷ Public constants | 3 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/icon-demo.png | 1.92KB | 0.77KB | ▼ 59.85% |
assets/images/logo.png | 4.13KB | 3.02KB | ▼ 26.81% |
assets/images/shadow.png | 0.37KB | 0.70KB | 0.00% |
inc/assets/images/logo.png | 4.13KB | 3.02KB | ▼ 26.81% |
inc/assets/images/shadow.png | 0.37KB | 0.70KB | 0.00% |