Benchmarks
Plugin footprint Passed 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.04MB] [CPU: ▼277.33ms] Passed 4 tests
An overview of server-side resources used by Protect Media
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.87 ▲0.15 | 37.97 ▲16.47 |
Dashboard /wp-admin | 3.10 ▲0.05 | 47.05 ▼3.11 |
Posts /wp-admin/edit.php | 3.15 ▲0.04 | 43.02 ▼0.55 |
Add New Post /wp-admin/post-new.php | 5.46 ▲0.03 | 93.82 ▼1,100.14 |
Media Library /wp-admin/upload.php | 3.04 ▲0.03 | 32.02 ▼5.50 |
Protect Media /wp-admin/upload.php?page=protect-media-config | 3.01 | 29.66 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Protect Media
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,654 ▲72 | 15.96 ▲0.43 | 7.56 ▼3.65 | 48.04 ▲1.07 |
Dashboard /wp-admin | 2,932 ▲82 | 5.89 ▼0.10 | 147.90 ▼5.35 | 106.30 ▼4.48 |
Posts /wp-admin/edit.php | 2,711 ▲5 | 2.69 ▲0.00 | 67.69 ▼4.12 | 139.81 ▲50.07 |
Add New Post /wp-admin/post-new.php | 1,659 ▲8 | 18.26 ▲1.21 | 390.83 ▲30.40 | 113.55 ▲6.55 |
Media Library /wp-admin/upload.php | 1,780 ▲8 | 5.11 ▲0.10 | 147.31 ▼12.14 | 110.54 ▼14.55 |
Protect Media /wp-admin/upload.php?page=protect-media-config | 1,034 | 2.10 | 58.50 | 58.42 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP Passed 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
The SRP test was a success
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: protect, japanese, media, uploads
protectmedia/protect-media.php 92% from 13 tests
The main PHP script in "Protect Media" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("protectmedia.php" instead of "protect-media.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin284 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 23 | 41 | 227 |
PO File | 1 | 15 | 18 | 57 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 36.00 |
▷ Minimum class complexity | 36.00 |
▷ Maximum class complexity | 36.00 |
Average method complexity | 3.92 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.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 | 12 | |
▷ Static methods | 3 | 25.00% |
▷ Public methods | 9 | 75.00% |
▷ Protected methods | 3 | 25.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 11 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 11 | 100.00% |
▷ Public constants | 11 | 100.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screen.png | 69.34KB | 20.95KB | ▼ 69.78% |