Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▼0.02MB] [CPU: ▼302.10ms] Passed 4 tests
This is a short check of server-side resources used by Advanced Custom Fields: Position Field
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.01 | 61.06 ▲5.48 |
Dashboard /wp-admin | 3.41 ▲0.01 | 38.20 ▼5.47 |
Posts /wp-admin/edit.php | 3.64 ▲0.01 | 45.34 ▲3.88 |
Add New Post /wp-admin/post-new.php | 6.89 ▼0.08 | 97.24 ▼1,197.37 |
Media Library /wp-admin/upload.php | 3.30 ▼0.00 | 27.03 ▼9.45 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for Advanced Custom Fields: Position Field
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,795 ▲41 | 15.12 ▼0.12 | 6.02 ▼0.30 | 2.73 ▼0.14 |
Dashboard /wp-admin | 2,895 ▲41 | 6.10 ▲0.02 | 113.05 ▼26.41 | 153.55 ▼10.44 |
Posts /wp-admin/edit.php | 2,688 ▼3 | 3.36 ▲0.13 | 62.45 ▼1.41 | 133.17 ▼14.77 |
Add New Post /wp-admin/post-new.php | 1,674 ▼78 | 21.57 ▲0.40 | 419.95 ▼35.24 | 176.17 ▼26.47 |
Media Library /wp-admin/upload.php | 1,701 ▼0 | 5.50 ▼0.04 | 146.14 ▲4.91 | 184.66 ▼60.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 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 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-position-field/register-fields.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/advanced-custom-fields-position-field/acf-position.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
- Tags: You are using too many tags: 12 tag instead of maximum 10
advanced-custom-fields-position-field/acf-position.php 92% from 13 tests
"Advanced Custom Fields: Position Field" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("advanced-custom-fields-position-field.php" instead of "acf-position.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected573 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 124 | 279 | 306 |
CSS | 1 | 30 | 0 | 167 |
JavaScript | 1 | 30 | 15 | 100 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 8.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 16.00 |
Average method complexity | 1.83 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 18 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 18 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/select2.png | 1.80KB | 1.24KB | ▼ 31.31% |
images/select2x2.png | 0.83KB | 0.77KB | ▼ 6.15% |