Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
- Install procedure had errors
- > Deprecated in wp-content/plugins/attachments-handler/core.class.php+1698
Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor
Server metrics [RAM: ▼0.00MB] [CPU: ▼170.68ms] Passed 4 tests
An overview of server-side resources used by Attachments Handler
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.83 ▲0.12 | 36.68 ▲8.10 |
Dashboard /wp-admin | 3.06 ▲0.00 | 45.58 ▼4.75 |
Posts /wp-admin/edit.php | 3.11 ▲0.00 | 49.69 ▲16.96 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.01 | 94.10 ▼675.18 |
Media Library /wp-admin/upload.php | 3.00 ▼0.01 | 30.95 ▼10.90 |
Server storage [IO: ▲1.91MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 159 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Attachments Handler
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,679 ▲83 | 16.12 ▲0.60 | 6.90 ▼3.70 | 53.24 ▼1.57 |
Dashboard /wp-admin | 2,970 ▲36 | 5.90 ▲0.01 | 138.15 ▼6.87 | 120.00 ▲6.96 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.70 ▲0.01 | 68.25 ▲1.75 | 100.03 ▲4.52 |
Add New Post /wp-admin/post-new.php | 1,615 ▲21 | 21.31 ▲2.55 | 280.30 ▼109.83 | 114.93 ▼0.43 |
Media Library /wp-admin/upload.php | 1,810 ▲3 | 5.01 ▼0.00 | 155.03 ▼5.64 | 129.88 ▼3.49 |
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
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/attachments-handler/core.class.php+1698
Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor
Smoke tests 50% 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 0% 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
The following issues need your attention
- 3× PHP files output text when accessed directly:
- > /wp-content/plugins/attachments-handler/attachments-handler.php
- > /wp-content/plugins/attachments-handler/core.class.php
- > /wp-content/plugins/attachments-handler/core.php
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/attachments-handler/core/templates/my-plugin.php on line 18
- > PHP Warning
require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/attachments-handler/core/templates/my-plugin.php on line 18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Screenshots: Add images for these screenshots: #1 (Issue detection), #2 (All links), #3 (Parameter screen)
attachments-handler/attachments-handler.php 92% from 13 tests
The entry point to "Attachments Handler" version 1.1.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 304 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected17,496 lines of code in 70 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 31 | 3,838 | 0 | 8,351 |
PHP | 19 | 1,131 | 1,873 | 7,671 |
JavaScript | 6 | 218 | 233 | 900 |
CSS | 10 | 85 | 13 | 459 |
Markdown | 1 | 20 | 0 | 84 |
JSON | 1 | 0 | 0 | 29 |
INI | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Please reduce cyclomatic complexity of methods to less than 100 (currently 119)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 58.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 211.00 |
Average method complexity | 7.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 119.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 19 | |
▷ Abstract classes | 1 | 5.26% |
▷ Concrete classes | 18 | 94.74% |
▷ Final classes | 0 | 0.00% |
Methods | 165 | |
▷ Static methods | 36 | 21.82% |
▷ Public methods | 162 | 98.18% |
▷ Protected methods | 3 | 1.82% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
37 PNG files occupy 0.67MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
core/img/tree_node_minus.png | 0.14KB | 0.12KB | ▼ 15.17% |
core/img/tree_node_plus.png | 0.15KB | 0.13KB | ▼ 12.50% |
core/img/warning.png | 4.46KB | 1.51KB | ▼ 66.10% |
core/img/flags_sprite.png | 30.37KB | 15.11KB | ▼ 50.23% |
core/img/arrow_down_s.png | 0.27KB | 0.27KB | ▼ 1.79% |