Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.05MB] [CPU: ▲2.27ms] Passed 4 tests
This is a short check of server-side resources used by Post Attachment Sizes
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.05 | 54.02 ▲12.50 |
Dashboard /wp-admin | 3.36 ▲0.06 | 59.28 ▲6.22 |
Posts /wp-admin/edit.php | 3.48 ▲0.12 | 59.11 ▲4.39 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 103.98 ▼4.65 |
Media Library /wp-admin/upload.php | 3.28 ▲0.04 | 40.93 ▲3.12 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Post Attachment Sizes
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.68 ▲0.33 | 1.94 ▲0.03 | 45.14 ▼0.79 |
Dashboard /wp-admin | 2,198 ▲21 | 5.65 ▼0.04 | 90.49 ▼11.24 | 43.81 ▲0.31 |
Posts /wp-admin/edit.php | 2,130 ▲30 | 1.97 ▲0.04 | 37.46 ▼1.27 | 35.58 ▲5.14 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 22.96 ▲2.21 | 676.06 ▼15.23 | 61.68 ▼1.47 |
Media Library /wp-admin/upload.php | 1,400 ▲3 | 4.24 ▲0.09 | 98.04 ▼25.75 | 41.96 ▼5.22 |
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 6 options in the database
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 6× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/post-attachment-sizes/inc/class-pas-attachments.php
- > /wp-content/plugins/post-attachment-sizes/inc/admin/class-pas-admin.php
- > /wp-content/plugins/post-attachment-sizes/post-attachment-sizes.php
- > /wp-content/plugins/post-attachment-sizes/inc/class-pas-activator.php
- > /wp-content/plugins/post-attachment-sizes/inc/class-pas-deactivator.php
- > /wp-content/plugins/post-attachment-sizes/inc/class-pas.php
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 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: attachments, post attachments, file size, post size, images...
post-attachment-sizes/post-attachment-sizes.php 92% from 13 tests
The main file in "Post Attachment Sizes" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
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 detected230 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 95 | 260 | 216 |
JSON | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 5.80 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 18.00 |
Average method complexity | 2.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.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 | 20 | |
▷ Static methods | 3 | 15.00% |
▷ Public methods | 12 | 60.00% |
▷ Protected methods | 2 | 10.00% |
▷ Private methods | 6 | 30.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin