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
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼3.23ms] Passed 4 tests
Server-side resources used by Compress Then Upload
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 34.82 ▼5.65 |
Dashboard /wp-admin | 3.31 ▲0.01 | 44.29 ▼3.11 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 45.90 ▲0.39 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 83.32 ▼1.40 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 33.27 ▼2.75 |
Compress Then Upload /wp-admin/upload.php?page=wpctu | 3.20 | 30.17 |
Server storage [IO: ▲3.26MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Compress Then Upload
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 13.33 ▼1.05 | 1.60 ▼0.11 | 38.69 ▼5.72 |
Dashboard /wp-admin | 2,213 ▲22 | 4.86 ▼0.08 | 108.16 ▲6.64 | 41.68 ▲2.37 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.01 ▲0.02 | 38.32 ▲2.00 | 34.72 ▲2.26 |
Add New Post /wp-admin/post-new.php | 1,537 ▲9 | 23.06 ▼0.27 | 639.83 ▼43.28 | 50.53 ▼2.42 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.23 ▲0.03 | 103.11 ▲4.54 | 44.95 ▼2.38 |
Compress Then Upload /wp-admin/upload.php?page=wpctu | 1,146 | 4.13 | 78.85 | 59.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
Please take a closer look at the following
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/compress-then-upload/compress-then-upload.php:20
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: image-compression, media
compress-then-upload/compress-then-upload.php Passed 13 tests
"Compress Then Upload" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
An image uploader that resizes and compresses images before getting uploaded.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin40,376 lines of code in 31 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 4 | 2 | 0 | 39,354 |
JSX | 6 | 47 | 5 | 443 |
PHP | 7 | 109 | 203 | 295 |
Sass | 1 | 17 | 0 | 98 |
CSS | 3 | 12 | 2 | 93 |
JavaScript | 7 | 5 | 6 | 75 |
HTML | 1 | 4 | 16 | 17 |
SVG | 1 | 0 | 0 | 1 |
Markdown | 1 | 1 | 0 | 0 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 5.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 9.00 |
Average method complexity | 1.71 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.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 | 29 | |
▷ Static methods | 2 | 6.90% |
▷ Public methods | 17 | 58.62% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 12 | 41.38% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.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