Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/attachment-file-icons/attachment-file-icons.php+25
Methods with the same name as their class will not be constructors in a future version of PHP; AttachmentFileIcons has a deprecated constructor
Server metrics [RAM: ▼1.76MB] [CPU: ▼53.37ms] Passed 4 tests
An overview of server-side resources used by Attachment File Icons (AF Icons)
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.22 ▼1.23 | 5.99 ▼38.15 |
Dashboard /wp-admin | 2.24 ▼1.06 | 6.01 ▼43.87 |
Posts /wp-admin/edit.php | 2.25 ▼1.11 | 5.85 ▼40.41 |
Add New Post /wp-admin/post-new.php | 2.25 ▼3.64 | 6.38 ▼91.04 |
Media Library /wp-admin/upload.php | 2.25 ▼0.98 | 6.91 ▼29.83 |
Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_afi_types |
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
Attachment File Icons (AF Icons): an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,919 ▲184 | 13.73 ▼0.64 | 6.17 ▲4.12 | 41.62 ▼8.45 |
Dashboard /wp-admin | 2,226 ▲41 | 5.89 ▲1.01 | 93.52 ▼23.06 | 78.25 ▲32.45 |
Posts /wp-admin/edit.php | 2,112 ▲23 | 2.08 ▲0.03 | 35.77 ▼1.23 | 36.93 ▲2.07 |
Add New Post /wp-admin/post-new.php | 1,684 ▲151 | 22.68 ▼0.49 | 718.61 ▲34.64 | 38.61 ▼15.43 |
Media Library /wp-admin/upload.php | 1,417 ▲29 | 4.18 ▼0.02 | 121.73 ▲15.94 | 42.25 ▼0.25 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/attachment-file-icons/attachment-file-icons.php+25
Methods with the same name as their class will not be constructors in a future version of PHP; AttachmentFileIcons has a deprecated constructor
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/attachment-file-icons/attachment-file-icons.php on line 38
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/attachment-file-icons/attachment-file-icons.php:38
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
- Tags: Please delete some tags, you are using 11 tag instead of maximum 10
- Screenshots: Add images for these screenshots: #1 (Screenshot Admin Section - Manage AF Icons), #2 (Screenshot Page Content with plugin enabled)
attachment-file-icons/attachment-file-icons.php 92% from 13 tests
The main file in "Attachment File Icons (AF Icons)" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Description: Keep the plugin description shorter than 140 characters (currently 189 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin758 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 119 | 139 | 467 |
JavaScript | 1 | 96 | 221 | 218 |
PO File | 1 | 17 | 22 | 51 |
CSS | 1 | 0 | 0 | 22 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 60.00 |
▷ Minimum class complexity | 60.00 |
▷ Maximum class complexity | 60.00 |
Average method complexity | 3.36 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.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 | 25 | |
▷ Static methods | 4 | 16.00% |
▷ Public methods | 25 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
17 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
mime/doc-icon.png | 0.76KB | 0.92KB | 0.00% |
afi_small.png | 3.14KB | 0.57KB | ▼ 81.76% |
screenshot-2.png | 31.55KB | 11.44KB | ▼ 63.74% |
mime/csv-icon.png | 3.37KB | 0.94KB | ▼ 72.07% |
mime/ppt-icon.png | 0.68KB | 0.60KB | ▼ 10.98% |