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
This plugin's installer ran successfully
Server metrics [RAM: ▼0.02MB] [CPU: ▼311.47ms] Passed 4 tests
This is a short check of server-side resources used by Add Code To Head
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▼0.04 | 52.26 ▼0.76 |
Dashboard /wp-admin | 3.42 ▲0.02 | 35.81 ▲1.36 |
Posts /wp-admin/edit.php | 3.65 ▲0.01 | 38.67 ▼41.98 |
Add New Post /wp-admin/post-new.php | 6.89 ▼0.08 | 96.02 ▼1,204.48 |
Media Library /wp-admin/upload.php | 3.31 ▲0.01 | 25.31 ▲1.46 |
Add Code to Head /wp-admin/options-general.php?page=acth_plugin | 3.25 | 22.65 |
Server storage [IO: ▲0.04MB] [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: 6 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Add Code To Head
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,786 ▲32 | 15.16 ▼0.89 | 8.00 ▲1.59 | 3.03 ▲0.08 |
Dashboard /wp-admin | 2,883 ▲25 | 6.11 ▼0.07 | 117.47 ▼17.40 | 160.07 ▼8.23 |
Posts /wp-admin/edit.php | 2,696 ▲11 | 3.23 ▲0.00 | 65.27 ▼1.59 | 140.80 ▼6.85 |
Add New Post /wp-admin/post-new.php | 1,638 ▼23 | 19.26 ▲2.99 | 444.43 ▼3.44 | 148.36 ▼7.02 |
Media Library /wp-admin/upload.php | 1,703 ▲2 | 5.51 ▼0.03 | 147.21 ▼0.89 | 192.05 ▲4.29 |
Add Code to Head /wp-admin/options-general.php?page=acth_plugin | 1,001 | 2.39 | 57.48 | 116.16 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=acth_plugin
- > Notice in wp-content/plugins/add-code-to-head/add-code-to-head.php+88
Trying to access array offset on value of type bool
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× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/add-code-to-head/uninstall.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-code-to-head/add-code-to-head.php:35
- > PHP Fatal error
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 97% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Screenshots: Please add an image for screenshot #1 (Options screen)
add-code-to-head/add-code-to-head.php Passed 13 tests
The primary PHP file in "Add Code To Head" version 1.15 is used by WordPress to initiate all plugin functionality
72 characters long description:
Adds custom html code (javascript, css, etc.) to each public page's head
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
Everything looks great! No dangerous files found in this plugin151 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 14 | 61 | 87 |
Markdown | 1 | 40 | 0 | 64 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 2.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 2.00 |
Average method complexity | 1.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 2.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 | 8 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 8 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.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
PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 28.49KB | 16.09KB | ▼ 43.53% |