Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼6.32ms] Passed 4 tests
Analyzing server-side resources used by Add Code To Head
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.40 ▼0.07 | 26.36 ▼12.20 |
Dashboard /wp-admin | 3.33 ▲0.02 | 48.22 ▲3.88 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 41.88 ▼7.63 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 91.73 ▼2.95 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 31.61 ▼2.50 |
Add Code to Head /wp-admin/options-general.php?page=acth_plugin | 3.19 | 29.36 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Add Code To Head
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 14.78 ▲0.38 | 1.80 ▲0.10 | 44.65 ▲8.43 |
Dashboard /wp-admin | 2,213 ▲28 | 4.88 ▼1.00 | 107.46 ▲8.97 | 42.09 ▼1.61 |
Posts /wp-admin/edit.php | 2,093 ▲1 | 2.01 ▲0.04 | 36.41 ▼4.63 | 33.05 ▼5.78 |
Add New Post /wp-admin/post-new.php | 1,545 ▲12 | 18.45 ▼4.92 | 601.57 ▲2.15 | 48.90 ▼9.51 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.29 ▲0.09 | 99.15 ▼3.96 | 45.76 ▲1.16 |
Add Code to Head /wp-admin/options-general.php?page=acth_plugin | 778 | 2.03 | 28.29 | 26.75 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- Zombie WordPress options detected upon uninstall: 6 options
- db_upgraded
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- > 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 2× PHP files trigger server errors when accessed directly:
- > 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 a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 97% 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 to be fixed:
- Screenshots: Please add an image for screenshot #1 (Options screen)
add-code-to-head/add-code-to-head.php Passed 13 tests
"Add Code To Head" version 1.15's main PHP file describes plugin functionality and also serves as the entry point to any WordPress 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
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
Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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% |