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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.13MB] [CPU: ▼3.80ms] Passed 4 tests
Analyzing server-side resources used by Disable Comments on Media Attachments
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.13 | 37.02 ▼4.79 |
Dashboard /wp-admin | 4.35 ▲1.05 | 50.11 ▲2.72 |
Posts /wp-admin/edit.php | 3.53 ▲0.18 | 44.45 ▼3.20 |
Add New Post /wp-admin/post-new.php | 6.00 ▲0.12 | 81.50 ▼9.93 |
Media Library /wp-admin/upload.php | 3.34 ▲0.12 | 37.09 ▲4.66 |
Server storage [IO: ▲0.04MB] [DB: ▲0.18MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Disable Comments on Media Attachments
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,895 ▲149 | 13.56 ▼1.03 | 1.63 ▼0.18 | 51.77 ▲8.19 |
Dashboard /wp-admin | 2,298 ▲107 | 5.87 ▲0.99 | 98.97 ▼9.47 | 41.76 ▼0.66 |
Posts /wp-admin/edit.php | 2,111 ▲22 | 2.02 ▲0.01 | 39.52 ▲4.41 | 34.96 ▼0.65 |
Add New Post /wp-admin/post-new.php | 1,553 ▲39 | 23.48 ▲5.65 | 662.60 ▲51.89 | 57.83 ▲0.97 |
Media Library /wp-admin/upload.php | 1,408 ▲17 | 4.20 ▲0.02 | 107.09 ▲10.04 | 46.77 ▲3.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.18MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- 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
Almost there! Just fix the following items
- 6× PHP files trigger server errors when accessed directly:
- > PHP Warning
include_once(ABSPATHWPINC/feed.php): failed to open stream: No such file or directory in wp-content/plugins/disable-comments-on-attachments/wpdev-dashboard-widget.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-comments-on-attachments/wpdev-dashboard-widget.php:52
- > PHP Warning
Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-comments-on-attachments/wpdev-dashboard-widget.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/disable-comments-on-attachments/disable-comments-on-attachments.php:15
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/disable-comments-on-attachments/wpdev-dashboard-widget.php on line 5
- > PHP Warning
include_once(): Failed opening 'ABSPATHWPINC/feed.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/disable-comments-on-attachments/wpdev-dashboard-widget.php on line 5
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 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: disable attachment comments, comments, disable comments, attachments comment, disable media comments...
disable-comments-on-attachments/disable-comments-on-attachments.php Passed 13 tests
This is the main PHP file of "Disable Comments on Media Attachments" version 0.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
Disable Comments on Media Attachments Pages
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected642 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 53 | 303 | 642 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 109.00 |
▷ Minimum class complexity | 109.00 |
▷ Maximum class complexity | 109.00 |
Average method complexity | 5.15 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 26.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 | 26 | |
▷ Static methods | 1 | 3.85% |
▷ Public methods | 20 | 76.92% |
▷ Protected methods | 4 | 15.38% |
▷ Private methods | 2 | 7.69% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 1 | 33.33% |
▷ Class constants | 2 | 66.67% |
▷ Public constants | 2 | 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