Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.38MB] [CPU: ▼3.06ms] Passed 4 tests
Analyzing server-side resources used by Prevent files / folders access
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.85 ▲0.38 | 43.79 ▲2.73 |
Dashboard /wp-admin | 3.68 ▲0.37 | 56.10 ▲4.14 |
Posts /wp-admin/edit.php | 3.80 ▲0.44 | 50.45 ▲0.07 |
Add New Post /wp-admin/post-new.php | 6.26 ▲0.37 | 89.29 ▼15.33 |
Media Library /wp-admin/upload.php | 3.61 ▲0.37 | 39.05 ▲0.30 |
Server storage [IO: ▲1.84MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, 8 new options
New WordPress options |
---|
host_name |
mo_enable_media_restriction |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
Prevent files / folders access: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲43 | 14.24 ▼0.11 | 2.02 ▲0.40 | 46.52 ▲5.26 |
Dashboard /wp-admin | 2,210 ▲30 | 5.69 ▲0.03 | 91.43 ▲5.55 | 83.58 ▲39.94 |
Posts /wp-admin/edit.php | 2,118 ▲15 | 1.99 ▼0.04 | 35.43 ▼6.98 | 37.47 ▲0.95 |
Add New Post /wp-admin/post-new.php | 1,559 ▲33 | 23.16 ▼0.40 | 668.53 ▲24.80 | 141.78 ▲89.52 |
Media Library /wp-admin/upload.php | 1,418 ▲24 | 4.24 ▼0.03 | 99.47 ▼13.38 | 70.58 ▲23.03 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin did not uninstall successfully, leaving 8 options in the database
- db_upgraded
- mo_enable_media_restriction
- widget_recent-comments
- widget_recent-posts
- host_name
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
Everything seems fine, however this is by no means an exhaustive test
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: content-restriction, secure-files, media management, protect-folders, download logs...
prevent-file-access/media-restriction.php 85% from 13 tests
The principal PHP file in "Prevent files / folders access" v. 2.5.3 is loaded by WordPress automatically on each request
You should first fix the following items:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 195 characters long)
- Main file name: It is recommended to name the main PHP file as the plugin slug ("prevent-file-access.php" instead of "media-restriction.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin4,371 lines of code in 25 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 266 | 739 | 3,136 |
SVG | 1 | 0 | 0 | 685 |
CSS | 6 | 8 | 40 | 544 |
JavaScript | 5 | 0 | 11 | 6 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 108)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 23.12 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 158.00 |
Average method complexity | 4.93 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 108.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 45 | |
▷ Static methods | 3 | 6.67% |
▷ Public methods | 36 | 80.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 9 | 20.00% |
Functions | 19 | |
▷ Named functions | 19 | 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
PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.41MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/paidmember.png | 6.00KB | 2.61KB | ▼ 56.54% |
admin/images/logo.png | 2.84KB | 1.59KB | ▼ 44.03% |
admin/images/trials-icon.png | 4.33KB | 2.63KB | ▼ 39.22% |
admin/images/tick.png | 28.84KB | 12.74KB | ▼ 55.81% |
admin/images/addon-icon.png | 2.43KB | 1.63KB | ▼ 32.78% |