Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.32MB] [CPU: ▼291.76ms] Passed 4 tests
An overview of server-side resources used by Autoswitch Image
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.85 ▲0.33 | 54.51 ▲2.40 |
Dashboard /wp-admin | 3.75 ▲0.34 | 36.08 ▲1.69 |
Posts /wp-admin/edit.php | 3.96 ▲0.31 | 39.53 ▼3.73 |
Add New Post /wp-admin/post-new.php | 7.27 ▲0.30 | 94.64 ▼1,167.41 |
Media Library /wp-admin/upload.php | 3.70 ▲0.40 | 25.74 ▲3.17 |
Add New /wp-admin/post-new.php?post_type=auto_s_image_ps | 4.25 | 45.53 |
Autoswitches Image /wp-admin/edit.php?post_type=auto_s_image_ps | 3.74 | 30.18 |
Server storage [IO: ▲4.60MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 322 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by Autoswitch Image
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,940 ▲198 | 16.07 ▲0.32 | 9.60 ▲2.77 | 2.45 ▲0.36 |
Dashboard /wp-admin | 2,928 ▲67 | 6.16 ▲0.00 | 120.24 ▼13.54 | 157.50 ▼6.31 |
Posts /wp-admin/edit.php | 2,732 ▲38 | 3.26 ▲0.02 | 64.00 ▲0.74 | 137.79 ▼2.28 |
Add New Post /wp-admin/post-new.php | 1,699 ▲38 | 16.38 ▼0.02 | 458.04 ▲43.16 | 157.32 ▲6.60 |
Media Library /wp-admin/upload.php | 1,747 ▲49 | 5.55 ▲0.01 | 138.46 ▼13.55 | 189.18 ▼2.66 |
Add New /wp-admin/post-new.php?post_type=auto_s_image_ps | 2,528 | 5.65 | 97.84 | 157.11 |
Autoswitches Image /wp-admin/edit.php?post_type=auto_s_image_ps | 1,423 | 3.17 | 61.57 | 112.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
- 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/tests/cmb-tests-base.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/example-functions.php:68
- > PHP Warning
require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/tests/bootstrap.php on line 24
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/tests/cmb-tests-base.php:10
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/tests/cmb-tests-base.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/bootstrap.php:12
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/tests/cmb-tests-base.php:10
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/tests/cmb-tests-base.php:10
- > PHP Fatal error
require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/tests/bootstrap.php on line 24
- > PHP Notice
Undefined variable: test_root in wp-content/plugins/pluginlyspeaking-autoswitchimage/cmb2/tests/bootstrap.php on line 24
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 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
7 plugin tags: slider, change, autoswitch, image, switch...
pluginlyspeaking-autoswitchimage/pluginlyspeaking-autoswitchimage.php Passed 13 tests
The main PHP script in "Autoswitch Image" version 1.2.1.1 is automatically included on every request by WordPress
36 characters long description:
Easily switch between a set of pics.
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
Everything looks great! No dangerous files found in this plugin88,536 lines of code in 173 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
XML | 2 | 0 | 0 | 47,741 |
PO File | 119 | 12,731 | 16,329 | 29,151 |
PHP | 22 | 1,413 | 2,275 | 4,900 |
CSS | 5 | 1,022 | 1,024 | 3,941 |
Sass | 11 | 168 | 23 | 1,116 |
JavaScript | 4 | 193 | 175 | 856 |
Markdown | 4 | 172 | 0 | 487 |
YAML | 2 | 9 | 0 | 152 |
JSON | 3 | 0 | 0 | 121 |
Bourne Shell | 1 | 19 | 7 | 71 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 28.76 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 121.00 |
Average method complexity | 2.79 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 21 | |
▷ Abstract classes | 1 | 4.76% |
▷ Concrete classes | 20 | 95.24% |
▷ Final classes | 0 | 0.00% |
Methods | 325 | |
▷ Static methods | 23 | 7.08% |
▷ Public methods | 309 | 95.08% |
▷ Protected methods | 10 | 3.08% |
▷ Private methods | 6 | 1.85% |
Functions | 34 | |
▷ Named functions | 34 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 4 | 66.67% |
▷ Class constants | 2 | 33.33% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
cmb2/images/ui-icons_cd0a0a_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png | 0.11KB | 0.14KB | 0.00% |
cmb2/images/ui-bg_glass_65_ffffff_1x400.png | 0.10KB | 0.10KB | ▼ 5.71% |
cmb2/images/ui-bg_glass_95_fef1ec_1x400.png | 0.12KB | 0.14KB | 0.00% |
cmb2/images/ui-icons_454545_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |