Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/crop-and-resize-images/includes/library.php+10
Methods with the same name as their class will not be constructors in a future version of PHP; stringProcess has a deprecated constructor
Server metrics [RAM: ▼1.74MB] [CPU: ▼53.01ms] Passed 4 tests
Analyzing server-side resources used by Crop and Resize Images
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.25 ▼1.22 | 4.84 ▼36.58 |
Dashboard /wp-admin | 2.27 ▼1.04 | 5.93 ▼47.05 |
Posts /wp-admin/edit.php | 2.27 ▼1.09 | 6.66 ▼43.83 |
Add New Post /wp-admin/post-new.php | 2.27 ▼3.62 | 6.13 ▼84.58 |
Media Library /wp-admin/upload.php | 2.27 ▼0.96 | 6.02 ▼30.15 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Crop and Resize Images
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,819 ▲58 | 14.25 ▼0.12 | 2.12 ▲0.59 | 39.64 ▼17.29 |
Dashboard /wp-admin | 2,200 ▲23 | 5.56 ▼0.02 | 94.72 ▲6.23 | 42.75 ▲0.45 |
Posts /wp-admin/edit.php | 2,284 ▲184 | 3.67 ▲1.68 | 101.55 ▲61.26 | 36.54 ▼2.91 |
Add New Post /wp-admin/post-new.php | 1,553 ▲25 | 18.47 ▼4.58 | 620.81 ▼70.68 | 43.43 ▼10.19 |
Media Library /wp-admin/upload.php | 1,418 ▲18 | 4.20 ▲0.00 | 85.85 ▼21.45 | 45.01 ▼3.63 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/crop-and-resize-images/includes/library.php+10
Methods with the same name as their class will not be constructors in a future version of PHP; stringProcess has a deprecated constructor
- Zombie WordPress options detected upon uninstall: 6 options
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- 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 | 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
Please take a closer look at the following
- 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: orig_img_data in wp-content/plugins/crop-and-resize-images/templates/scale-original-image.php on line 17
- > PHP Notice
Undefined variable: orig_img_data in wp-content/plugins/crop-and-resize-images/templates/scale-original-image.php on line 17
- > PHP Notice
Undefined variable: res in wp-content/plugins/crop-and-resize-images/templates/uie-get-editor.php on line 52
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/crop-and-resize-images/templates/uie-get-editor.php on line 30
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/crop-and-resize-images/templates/scale-original-image.php:19
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/crop-and-resize-images/templates/scale-original-image.php on line 17
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/crop-and-resize-images/templates/uie-get-editor.php on line 7
- > PHP Notice
Trying to get property 'img_size' of non-object in wp-content/plugins/crop-and-resize-images/templates/uie-get-editor.php on line 52
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/crop-and-resize-images/templates/uie-get-editor.php on line 8
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/crop-and-resize-images/templates/uie-get-editor.php on line 29
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: resize, resize image, crop image, crop, picture...
crop-and-resize-images/wp-crop-and-resize.php 92% from 13 tests
The primary PHP file in "Crop and Resize Images" version 1.2.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("crop-and-resize-images.php" instead of "wp-crop-and-resize.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,638 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 311 | 151 | 737 |
JavaScript | 4 | 186 | 38 | 723 |
CSS | 6 | 21 | 8 | 178 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 27.50 |
▷ Minimum class complexity | 14.00 |
▷ Maximum class complexity | 41.00 |
Average method complexity | 2.66 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 32 | |
▷ Static methods | 19 | 59.38% |
▷ Public methods | 32 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/uploader-icons.png | 1.52KB | 2.04KB | 0.00% |
img/dw.png | 0.59KB | 0.24KB | ▼ 58.75% |