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.79MB] [CPU: ▲0.30ms] Passed 4 tests
An overview of server-side resources used by Attachment Usage
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.22 ▲0.76 | 43.24 ▼2.93 |
Dashboard /wp-admin | 4.11 ▲0.81 | 57.73 ▲7.85 |
Posts /wp-admin/edit.php | 4.17 ▲0.81 | 54.08 ▲9.48 |
Add New Post /wp-admin/post-new.php | 6.70 ▲0.81 | 88.40 ▼13.20 |
Media Library /wp-admin/upload.php | 4.02 ▲0.79 | 50.20 ▲9.60 |
Attachment Usage Settings /wp-admin/upload.php?page=attachment-usage-page | 4.04 | 38.89 |
Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 119 new files
Database: no new tables, 12 new options
New WordPress options |
---|
widget_recent-comments |
au_display_usage_listview |
au_filter_by_usage |
au_is_rating_dismissed |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
au_color_status |
au_attachment_usage_found |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for Attachment Usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,064 ▲293 | 15.47 ▲1.11 | 4.85 ▲2.83 | 38.80 ▼5.73 |
Dashboard /wp-admin | 2,359 ▲177 | 6.53 ▲0.63 | 137.66 ▲27.10 | 41.84 ▼0.14 |
Posts /wp-admin/edit.php | 2,268 ▲182 | 3.33 ▲1.32 | 50.36 ▲12.25 | 33.52 ▼1.14 |
Add New Post /wp-admin/post-new.php | 1,686 ▲158 | 22.09 ▲3.73 | 627.93 ▼16.84 | 37.35 ▼17.45 |
Media Library /wp-admin/upload.php | 1,430 ▲39 | 4.08 ▼0.10 | 83.68 ▼15.56 | 48.82 ▲3.29 |
Attachment Usage Settings /wp-admin/upload.php?page=attachment-usage-page | 1,094 | 3.06 | 42.56 | 27.76 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
Almost there! Just fix the following items
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/attachment-usage/admin/partials/attachment-usage-admin-display.php
- > /wp-content/plugins/attachment-usage/public/partials/attachment-usage-public-display.php
- 45× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'AttachmentUsage\\Core\\Finder\\Abstract_Attachment_Finder' not found in wp-content/plugins/attachment-usage/admin/classes/finder/post-content-attachment-finder.php:5
- > PHP Fatal error
Uncaught Error: Interface 'AttachmentUsage\\Interfaces\\IFactory' not found in wp-content/plugins/attachment-usage/admin/settings_page/elements/validators/validator-factory.php:6
- > PHP Fatal error
Uncaught Error: Class 'AttachmentUsage\\Core\\ContentHolder\\Abstract_Content_Holder' not found in wp-content/plugins/attachment-usage/admin/classes/content_holder/content-holder.php:5
- > PHP Fatal error
Uncaught Error: Class 'AttachmentUsage\\Core\\ResultBuilder\\Abstract_Attachment_Result_Builder' not found in wp-content/plugins/attachment-usage/admin/classes/result_builder/thumbnail-attachment-result-builder.php:5
- > PHP Fatal error
Uncaught Error: Class 'AttachmentUsage\\Core\\Finder\\Abstract_Attachment_Finder' not found in wp-content/plugins/attachment-usage/admin/classes/finder/product-category-media-finder.php:5
- > PHP Fatal error
Uncaught Error: Class 'AttachmentUsage\\SettingsLib\\Elements\\Validators\\Abstract_Validator' not found in wp-content/plugins/attachment-usage/admin/settings_page/elements/validators/number-validator.php:6
- > PHP Fatal error
Uncaught Error: Class 'AttachmentUsage\\SettingsLib\\Elements\\Basic_Field' not found in wp-content/plugins/attachment-usage/admin/settings_page/elements/fields/textarea.php:5
- > PHP Fatal error
Uncaught Error: Interface 'AttachmentUsage\\Interfaces\\IConfigure' not found in wp-content/plugins/attachment-usage/admin/classes/meta-box.php:7
- > PHP Fatal error
Uncaught Error: Class 'AttachmentUsage\\SettingsLib\\Elements\\Validators\\Abstract_Whitelist_Validator' not found in wp-content/plugins/attachment-usage/admin/settings_page/elements/validators/radio-whitelist-validator.php:4
- > PHP Fatal error
Uncaught Error: Class 'AttachmentUsage\\SettingsLib\\Elements\\Basic_Element' not found in wp-content/plugins/attachment-usage/admin/settings_page/elements/section.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
- Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
attachment-usage/attachment-usage.php Passed 13 tests
"Attachment Usage" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
117 characters long description:
Find your attachment/media files used by different locations (posts, pages, widgets, galleries etc.) on your website.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected4,041 lines of code in 112 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 104 | 666 | 159 | 3,374 |
JavaScript | 5 | 52 | 41 | 374 |
PO File | 1 | 74 | 88 | 226 |
CSS | 2 | 18 | 4 | 67 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 5.31 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 30.00 |
Average method complexity | 2.32 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 4 | |
Traits | 0 | |
Classes | 76 | |
▷ Abstract classes | 6 | 7.89% |
▷ Concrete classes | 70 | 92.11% |
▷ Final classes | 0 | 0.00% |
Methods | 275 | |
▷ Static methods | 6 | 2.18% |
▷ Public methods | 174 | 63.27% |
▷ Protected methods | 46 | 16.73% |
▷ Private methods | 55 | 20.00% |
Functions | 8 | |
▷ Named functions | 4 | 50.00% |
▷ Anonymous functions | 4 | 50.00% |
Constants | 2 | |
▷ Global constants | 1 | 50.00% |
▷ Class constants | 1 | 50.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin