Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.10MB] [CPU: ▼0.98ms] Passed 4 tests
Server-side resources used by Restrict WP Upload Type
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.10 | 38.71 ▼2.08 |
Dashboard /wp-admin | 3.40 ▲0.09 | 47.50 ▲0.38 |
Posts /wp-admin/edit.php | 3.51 ▲0.15 | 44.30 ▼3.62 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 92.65 ▲7.22 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 38.68 ▲1.39 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Restrict WP Upload Type
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,924 ▲167 | 13.90 ▼0.68 | 8.79 ▲6.87 | 43.60 ▲0.95 |
Dashboard /wp-admin | 2,219 ▲31 | 4.87 ▼0.04 | 117.01 ▲17.53 | 45.20 ▲0.22 |
Posts /wp-admin/edit.php | 2,105 ▲16 | 2.05 ▲0.04 | 35.66 ▼4.83 | 32.23 ▼3.99 |
Add New Post /wp-admin/post-new.php | 1,528 ▼10 | 23.22 ▲0.19 | 780.71 ▲104.17 | 61.32 ▲9.49 |
Media Library /wp-admin/upload.php | 1,407 ▲16 | 4.18 ▼0.03 | 109.42 ▲1.54 | 50.20 ▲0.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/restrict-wp-upload-type/public/partials/restrict-wp-upload-type-public-display.php
- > /wp-content/plugins/restrict-wp-upload-type/admin/partials/restrict-wp-upload-type-admin-display.php
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/restrict-wp-upload-type/includes/class-restrict-wp-upload-type.php:220
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restrict-wp-upload-type/includes/class-restrict-wp-upload-type-loader.php:149
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/restrict-wp-upload-type/includes/index.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: mime, file type, restrict, files, mime type...
restrict-wp-upload-type/restrict-wp-upload-type.php Passed 13 tests
"Restrict WP Upload Type" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
Enable and Restrict the upload mime file type accross with 96 extensions.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected937 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 220 | 523 | 736 |
CSS | 2 | 10 | 16 | 174 |
JavaScript | 2 | 8 | 54 | 27 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 1.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 23 | |
▷ Static methods | 2 | 8.70% |
▷ Public methods | 18 | 78.26% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 21.74% |
Functions | 8 | |
▷ Named functions | 8 | 100.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 Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin