Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼139.02ms] Passed 4 tests
Analyzing server-side resources used by ACF User Role Field Setting
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.86 ▲0.14 | 36.37 ▲16.25 |
Dashboard /wp-admin | 3.08 ▲0.03 | 49.94 ▼2.21 |
Posts /wp-admin/edit.php | 3.13 ▲0.02 | 49.92 ▲2.64 |
Add New Post /wp-admin/post-new.php | 5.44 ▲0.01 | 103.12 ▼549.19 |
Media Library /wp-admin/upload.php | 3.02 ▲0.02 | 34.41 ▼7.33 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
ACF User Role Field Setting: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,679 ▲83 | 15.97 ▲0.38 | 12.04 ▲2.13 | 47.80 ▲0.18 |
Dashboard /wp-admin | 2,970 ▲33 | 5.91 ▼0.09 | 148.54 ▼5.86 | 113.77 ▼5.04 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.72 ▲0.02 | 63.63 ▼4.65 | 89.44 ▼0.52 |
Add New Post /wp-admin/post-new.php | 1,615 ▼68 | 21.74 ▲2.94 | 329.35 ▼53.98 | 111.92 ▼8.11 |
Media Library /wp-admin/upload.php | 1,810 ▲62 | 5.03 ▲0.02 | 144.45 ▼17.11 | 115.62 ▼7.84 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 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
These attributes need your attention:
- Screenshots: Screenshot #1 (Field setting on example field) image not found
user-role-field-setting-for-acf/acf-user-role-field-setting.php 92% from 13 tests
This is the main PHP file of "ACF User Role Field Setting" version 3.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("user-role-field-setting-for-acf.php" instead of "acf-user-role-field-setting.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin148 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 17 | 20 | 137 |
JSON | 1 | 0 | 0 | 11 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.70 |
Average class complexity | 32.00 |
▷ Minimum class complexity | 32.00 |
▷ Maximum class complexity | 32.00 |
Average method complexity | 4.10 |
▷ 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 | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 6 | 60.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 40.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 13.23KB | 10.97KB | ▼ 17.10% |