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
Install script ran successfully
Server metrics [RAM: ▲0.05MB] [CPU: ▼7.59ms] Passed 4 tests
Server-side resources used by MCM Protected File View
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 40.89 ▲2.39 |
Dashboard /wp-admin | 3.36 ▲0.05 | 45.27 ▼5.35 |
Posts /wp-admin/edit.php | 3.41 ▲0.05 | 43.45 ▼5.55 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 80.09 ▼20.55 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 35.75 ▲1.10 |
MCM Protected File View /wp-admin/options-general.php?page=mcm_protected_file_view | 3.25 | 30.74 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
MCM Protected File View: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 13.29 ▼1.27 | 1.77 ▲0.13 | 43.55 ▼2.72 |
Dashboard /wp-admin | 2,213 ▲25 | 5.86 ▼0.04 | 102.37 ▲2.08 | 39.41 ▼3.95 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 1.99 ▼0.08 | 35.28 ▼5.79 | 31.88 ▼4.20 |
Add New Post /wp-admin/post-new.php | 1,517 ▼25 | 17.70 ▼0.73 | 599.66 ▼44.25 | 50.83 ▼4.89 |
Media Library /wp-admin/upload.php | 1,392 ▲10 | 4.22 ▼0.11 | 92.90 ▼5.14 | 40.77 ▼4.06 |
MCM Protected File View /wp-admin/options-general.php?page=mcm_protected_file_view | 784 | 2.02 | 23.84 | 38.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mcm-protected-file-view/mcm-protected-file-view.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
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
2 plugin tags: plugin, file
mcm-protected-file-view/mcm-protected-file-view.php Passed 13 tests
"MCM Protected File View" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
68 characters long description:
Protect uploaded files so they can only be viewed by logged-in users
Code Analysis Passed 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 detected378 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 154 | 30 | 378 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 62.00 |
▷ Minimum class complexity | 62.00 |
▷ Maximum class complexity | 62.00 |
Average method complexity | 4.81 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 25.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 | 16 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 16 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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 are no PNG files in this plugin