Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼8.68ms] Passed 4 tests
Analyzing server-side resources used by DX Delete Attached Media
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.04 | 42.89 ▼3.34 |
Dashboard /wp-admin | 3.35 ▲0.01 | 47.13 ▼19.16 |
Posts /wp-admin/edit.php | 3.41 ▲0.05 | 53.17 ▲1.89 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.07 | 97.67 ▼14.10 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 39.54 ▲4.35 |
DX Delete Attached Media /wp-admin/admin.php?page=dx-dam-options | 3.30 | 37.70 |
Help page /wp-admin/admin.php?page=dx_dam_help | 3.25 | 27.49 |
Server storage [IO: ▲1.07MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
dx_delete_attached_media_options |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for DX Delete Attached Media
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,865 ▲104 | 14.36 ▲0.04 | 1.96 ▲0.27 | 38.68 ▼4.32 |
Dashboard /wp-admin | 2,223 ▲43 | 5.63 ▼0.01 | 93.53 ▲1.07 | 39.37 ▼2.91 |
Posts /wp-admin/edit.php | 2,134 ▲34 | 2.07 ▲0.05 | 42.08 ▲6.07 | 37.24 ▲2.07 |
Add New Post /wp-admin/post-new.php | 1,552 ▲24 | 23.20 ▲0.09 | 677.06 ▼27.12 | 53.13 ▼2.30 |
Media Library /wp-admin/upload.php | 1,431 ▲31 | 4.24 ▲0.04 | 109.51 ▲2.59 | 49.33 ▲2.38 |
DX Delete Attached Media /wp-admin/admin.php?page=dx-dam-options | 1,005 | 2.06 | 22.35 | 38.63 |
Help page /wp-admin/admin.php?page=dx_dam_help | 1,115 | 2.06 | 23.87 | 71.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- This plugin did not uninstall successfully, leaving 7 options in the database
- db_upgraded
- dx_delete_attached_media_options
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- 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 no errors were found, this is by no means 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 fix the following items
- 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/dx-delete-attached-media/dx-delete-attached-media.php:11
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dx-delete-attached-media/dx-attachments-list.php on line 3
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/dx-delete-attached-media/dx-attachments-list.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/dx-delete-attached-media/templates/dx-dam-help-page.php:3
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/dx-delete-attached-media/dx-attachments-list.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: post, media, attachment
dx-delete-attached-media/dx-delete-attached-media.php Passed 13 tests
Analyzing the main PHP file in "DX Delete Attached Media" version 2.0.5.1
106 characters long description:
Delete attached media to all posts (if activated). Remove images assigned to a post to clear old archives.
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
Good job! No executable or dangerous file extensions detected1,012 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 100 | 116 | 570 |
CSS | 1 | 31 | 0 | 267 |
JavaScript | 1 | 6 | 0 | 135 |
PO File | 1 | 4 | 8 | 24 |
SVG | 1 | 2 | 0 | 16 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 28.00 |
▷ Minimum class complexity | 28.00 |
▷ Maximum class complexity | 28.00 |
Average method complexity | 5.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 20.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 | 6 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 6 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 13 | |
▷ Named functions | 13 | 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 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 1.02MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/image5.png | 134.92KB | 46.18KB | ▼ 65.77% |
images/image3.png | 138.84KB | 48.43KB | ▼ 65.12% |
images/image2.png | 132.90KB | 45.39KB | ▼ 65.85% |
images/plugin2.png | 3.08KB | 2.45KB | ▼ 20.40% |
images/plugin1.png | 29.40KB | 9.84KB | ▼ 66.51% |