Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼1.87ms] Passed 4 tests
Server-side resources used by Custom Mime Types
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 39.72 ▲1.33 |
Dashboard /wp-admin | 3.32 ▲0.02 | 51.55 ▲1.85 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 54.33 ▲6.92 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 85.45 ▼10.03 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 37.96 ▼0.62 |
Custom MIME Types /wp-admin/options-general.php?page=custom-mime-types | 3.29 | 30.59 |
Server storage [IO: ▲0.17MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 10 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
_cmt_activated |
db_upgraded |
_cmt_mimes |
_cmt_size_unit |
widget_theysaidso_widget |
_cmt_max_upload_size |
Browser metrics Passed 4 tests
Checking browser requirements for Custom Mime Types
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,802 ▲16 | 14.42 ▲0.05 | 1.99 ▼0.10 | 44.02 ▼6.95 |
Dashboard /wp-admin | 2,208 ▲28 | 5.87 ▲0.20 | 93.08 ▼8.25 | 43.23 ▲0.86 |
Posts /wp-admin/edit.php | 2,113 ▲13 | 2.30 ▲0.27 | 36.27 ▼0.99 | 32.64 ▼4.98 |
Add New Post /wp-admin/post-new.php | 1,538 ▲12 | 23.35 ▲0.10 | 662.79 ▼26.42 | 36.14 ▼22.16 |
Media Library /wp-admin/upload.php | 1,416 ▲19 | 4.42 ▲0.21 | 100.39 ▼15.40 | 45.94 ▼2.11 |
Custom MIME Types /wp-admin/options-general.php?page=custom-mime-types | 1,288 | 3.15 | 75.42 | 47.17 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 10 options
- _cmt_mimes
- _cmt_size_unit
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
- _cmt_activated
- widget_recent-posts
- _cmt_max_upload_size
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
- 2× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function Custom_MIME_Types\\plugin_dir_path() in wp-content/plugins/custom-mime-types/includes/class/class-app.php:42
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-mime-types/includes/templates/admin-dashboard.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
- Tags: Please delete some tags, you are using 11 tag instead of maximum 10
custom-mime-types/custom-mime-types.php 85% from 13 tests
The entry point to "Custom Mime Types" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 176 characters long)
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected376 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 107 | 148 | 373 |
JavaScript | 2 | 0 | 0 | 2 |
CSS | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 6.33 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 13.00 |
Average method complexity | 1.94 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 3 | 100.00% |
Methods | 18 | |
▷ Static methods | 1 | 5.56% |
▷ Public methods | 18 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 1 | 100.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin