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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼11.70ms] Passed 4 tests
An overview of server-side resources used by WC Image Swapper
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 37.26 ▼6.98 |
Dashboard /wp-admin | 3.35 ▲0.00 | 46.73 ▼24.61 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 44.22 ▼8.16 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 90.30 ▼7.03 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 36.77 ▼0.51 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_recent-comments |
wcpis-options |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for WC Image Swapper
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,913 ▲152 | 13.60 ▼0.83 | 5.42 ▲3.51 | 40.87 ▼5.49 |
Dashboard /wp-admin | 2,226 ▲23 | 5.83 ▲0.02 | 101.17 ▼17.18 | 42.02 ▼1.33 |
Posts /wp-admin/edit.php | 2,108 ▲8 | 2.02 ▼0.04 | 36.72 ▼0.83 | 34.75 ▼0.82 |
Add New Post /wp-admin/post-new.php | 1,533 ▼17 | 17.66 ▼5.49 | 696.35 ▲28.63 | 69.28 ▲17.58 |
Media Library /wp-admin/upload.php | 1,405 ▲5 | 4.19 ▼0.15 | 99.45 ▼21.42 | 42.74 ▼8.57 |
WC image swap /wp-admin/wc-imageswap.php | 26 | 0.44 | 0.10 | 15.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Zombie WordPress options were found after uninstall: 7 options
- widget_recent-comments
- can_compress_scripts
- wcpis-options
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
Smoke tests 25% 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 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
Almost there! Just fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/wc-image-swapper/index.php
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-image-swapper/wc-imageswap.php:16
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
- > GET request to /wp-admin/wc-imageswap.php
- > Network (severe)
wp-admin/wc-imageswap.php - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
- Tags: Please delete some tags, you are using 11 tag instead of maximum 10
wc-image-swapper/wc-imageswap.php 77% from 13 tests
The main file in "WC Image Swapper" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
- Description: Keep the plugin description shorter than 140 characters (currently 220 characters long)
- Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-image-swapper.php" instead of "wc-imageswap.php")
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
There were no executable files found in this plugin344 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 16 | 44 | 175 |
CSS | 5 | 15 | 10 | 160 |
JavaScript | 1 | 2 | 3 | 9 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 12.00 |
▷ Minimum class complexity | 12.00 |
▷ Maximum class complexity | 12.00 |
Average method complexity | 2.38 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.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 | 8 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 8 | 100.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
All PNG images should be compressed to minimize bandwidth usage for end users
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/images/help.png | 0.76KB | 0.57KB | ▼ 24.74% |