Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼152.48ms] Passed 4 tests
Server-side resources used by Image Shrink
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.85 ▲0.13 | 37.22 ▲14.63 |
Dashboard /wp-admin | 3.08 ▲0.02 | 57.38 ▼5.53 |
Posts /wp-admin/edit.php | 3.13 ▲0.02 | 50.20 ▼0.32 |
Add New Post /wp-admin/post-new.php | 5.43 ▲0.00 | 89.73 ▼604.74 |
Media Library /wp-admin/upload.php | 3.02 ▲0.02 | 36.18 ▲0.66 |
Image Shrink /wp-admin/options-general.php?page=imageshrink | 2.99 | 27.18 |
Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options |
---|
image_size_max_shrink |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Image Shrink
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,694 ▲98 | 15.96 ▲0.29 | 6.38 ▼2.21 | 49.17 ▲4.15 |
Dashboard /wp-admin | 2,975 ▲38 | 5.91 ▼0.01 | 138.76 ▼23.49 | 125.04 ▼9.79 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.68 ▼0.00 | 68.98 ▼6.76 | 90.52 ▼4.60 |
Add New Post /wp-admin/post-new.php | 1,503 ▼101 | 18.60 ▼0.27 | 404.75 ▲16.44 | 123.32 ▲11.56 |
Media Library /wp-admin/upload.php | 1,812 ▲2 | 5.02 ▲0.00 | 159.86 ▲25.60 | 126.78 ▼0.92 |
Image Shrink /wp-admin/options-general.php?page=imageshrink | 1,051 | 2.09 | 56.06 | 77.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
Please take a closer look at the following
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/image-shrink/options.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/image-shrink/imageshrink.php:89
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: Screenshot #1 (I don't have at this time.) image required
image-shrink/imageshrink.php 92% from 13 tests
The main PHP script in "Image Shrink" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("image-shrink.php" instead of "imageshrink.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin83 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 29 | 11 | 83 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.21 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin