Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.27MB] [CPU: ▼5.70ms] Passed 4 tests
Server-side resources used by Picsmize
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.74 ▲0.27 | 38.47 ▲2.69 |
Dashboard /wp-admin | 3.59 ▲0.24 | 47.38 ▼9.47 |
Posts /wp-admin/edit.php | 3.70 ▲0.34 | 49.20 ▲3.29 |
Add New Post /wp-admin/post-new.php | 6.19 ▲0.30 | 85.88 ▼19.32 |
Media Library /wp-admin/upload.php | 3.51 ▲0.28 | 37.61 ▲7.03 |
API Settings /wp-admin/admin.php?page=settings | 3.50 | 32.12 |
Manual Upload /wp-admin/admin.php?page=pics-manual | 3.50 | 31.65 |
Dashboard /wp-admin/admin.php?page=pics-dashboard | 3.56 | 32.62 |
ALT Settings /wp-admin/admin.php?page=alt-change | 3.54 | 33.50 |
Compress Settings /wp-admin/admin.php?page=compress | 3.49 | 30.67 |
File Rename Settings /wp-admin/admin.php?page=rename | 3.54 | 30.25 |
Server storage [IO: ▲1.06MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 36 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_pics_images |
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Picsmize
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,882 ▲111 | 13.79 ▼0.58 | 1.66 ▼0.33 | 42.65 ▲2.77 |
Dashboard /wp-admin | 2,288 ▲96 | 5.20 ▲0.22 | 113.56 ▲2.09 | 50.04 ▲10.96 |
Posts /wp-admin/edit.php | 2,159 ▲67 | 2.37 ▲0.34 | 37.25 ▼0.20 | 40.66 ▲8.03 |
Add New Post /wp-admin/post-new.php | 1,571 ▲57 | 23.75 ▲6.26 | 709.31 ▲15.26 | 61.55 ▲16.71 |
Media Library /wp-admin/upload.php | 1,532 ▲144 | 4.55 ▲0.37 | 101.61 ▼1.89 | 51.25 ▲7.29 |
API Settings /wp-admin/admin.php?page=settings | 1,100 | 1.95 | 25.46 | 45.47 |
Manual Upload /wp-admin/admin.php?page=pics-manual | 1,339 | 2.60 | 47.56 | 62.34 |
Dashboard /wp-admin/admin.php?page=pics-dashboard | 1,798 | 2.62 | 45.51 | 63.15 |
ALT Settings /wp-admin/admin.php?page=alt-change | 1,335 | 2.09 | 26.83 | 37.98 |
Compress Settings /wp-admin/admin.php?page=compress | 1,058 | 2.08 | 25.64 | 38.99 |
File Rename Settings /wp-admin/admin.php?page=rename | 1,334 | 2.11 | 26.63 | 37.48 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- Zombie tables were found after uninstall: 1 table
- wp_pics_images
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=compress
- > Notice in wp-content/plugins/picsmize/templates/compressImage.php+93
Undefined variable: jpegQuality
- > GET request to /wp-admin/admin.php?page=compress
- > Notice in wp-content/plugins/picsmize/templates/compressImage.php+93
Undefined variable: pngQuality
- > GET request to /wp-admin/admin.php?page=compress
- > Notice in wp-content/plugins/picsmize/templates/compressImage.php+93
Undefined variable: gifQuality
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/picsmize/templates/toast.php
- 10× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_statuses() in wp-content/plugins/picsmize/templates/image-history.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function picsCompressStyle() in wp-content/plugins/picsmize/templates/compressImage.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/picsmize/templates/auth.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/picsmize/templates/manual.php:20
- > PHP Warning
require(PICS_DIR/lib/Client.php): failed to open stream: No such file or directory in wp-content/plugins/picsmize/lib/Picsmize.php on line 3
- > PHP Fatal error
require(): Failed opening required 'PICS_DIR/lib/Client.php' (include_path='.:/usr/share/php') in wp-content/plugins/picsmize/lib/Picsmize.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'PicsmizeCommon' not found in wp-content/plugins/picsmize/templates/altChange.php:2
- > PHP Fatal error
Uncaught Error: Class 'PicsmizeCommon' not found in wp-content/plugins/picsmize/templates/renameImage.php:2
- > PHP Warning
Use of undefined constant PICS_DIR - assumed 'PICS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/picsmize/lib/Picsmize.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/picsmize/includes/functions.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
- Plugin Name: You should set the name of your plugin on the first line (
=== picsmize ===
)
picsmize/picsmize.php Passed 13 tests
Analyzing the main PHP file in "Picsmize" version 1.0.0
130 characters long description:
Optimize & speed up your store by compressing product and other asset images with different modes like lossy, balanced & lossless.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected6,862 lines of code in 30 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 16 | 399 | 242 | 2,872 |
CSS | 7 | 2,057 | 18 | 2,512 |
JavaScript | 7 | 185 | 67 | 1,478 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 28.20 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 96.00 |
Average method complexity | 3.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 37.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 51 | |
▷ Static methods | 8 | 15.69% |
▷ Public methods | 48 | 94.12% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 5.88% |
Functions | 20 | |
▷ Named functions | 20 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 26 | |
▷ Global constants | 8 | 30.77% |
▷ Class constants | 18 | 69.23% |
▷ Public constants | 18 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.44MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/pics-api.png | 85.67KB | 29.93KB | ▼ 65.06% |
assets/images/pis-dashboard.png | 141.93KB | 41.60KB | ▼ 70.69% |
assets/images/pics-rename.png | 67.33KB | 22.20KB | ▼ 67.04% |
assets/images/pics-manual.png | 111.77KB | 31.74KB | ▼ 71.60% |
assets/images/pics-compression.png | 45.70KB | 13.77KB | ▼ 69.86% |