Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.10MB] [CPU: ▼7.25ms] Passed 4 tests
A check of server-side resources used by Better Resource Hints
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 37.58 ▼5.90 |
Dashboard /wp-admin | 3.41 ▲0.07 | 50.87 ▼10.54 |
Posts /wp-admin/edit.php | 3.53 ▲0.17 | 48.48 ▼4.81 |
Add New Post /wp-admin/post-new.php | 6.01 ▲0.13 | 87.33 ▼7.74 |
Media Library /wp-admin/upload.php | 3.34 ▲0.11 | 40.66 ▲4.57 |
Better Resource Hints /wp-admin/options-general.php?page=better_resource_hints | 3.31 | 34.63 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Better Resource Hints
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,802 ▲41 | 14.35 ▼0.02 | 2.40 ▼0.20 | 45.55 ▲4.40 |
Dashboard /wp-admin | 2,206 ▲29 | 5.64 ▲0.04 | 84.71 ▼3.98 | 42.81 ▲0.19 |
Posts /wp-admin/edit.php | 2,108 ▲5 | 2.03 ▲0.01 | 39.03 ▼1.80 | 33.27 ▼3.65 |
Add New Post /wp-admin/post-new.php | 1,275 ▼251 | 13.62 ▼9.54 | 269.52 ▼395.24 | 32.16 ▼20.06 |
Media Library /wp-admin/upload.php | 1,411 ▲11 | 4.20 ▲0.02 | 109.11 ▲4.49 | 49.11 ▲4.22 |
Better Resource Hints /wp-admin/options-general.php?page=better_resource_hints | 1,305 | 2.17 | 23.42 | 45.27 |
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
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
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
Even though no errors were found, this is by no means an exhaustive test
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
- 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function BetterResourceHints\\plugin_dir_path() in wp-content/plugins/better-resource-hints/src/inc/promo.php:15
- > PHP Fatal error
Uncaught Error: Class 'BetterResourceHints\\Utilities' not found in wp-content/plugins/better-resource-hints/src/inc/preconnect-assets.php:4
- > PHP Fatal error
Uncaught Error: Class 'BetterResourceHints\\Utilities' not found in wp-content/plugins/better-resource-hints/src/inc/preloaded-scripts.php:4
- > PHP Fatal error
Uncaught Error: Class 'BetterResourceHints\\Utilities' not found in wp-content/plugins/better-resource-hints/src/inc/preloaded-styles.php:4
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/better-resource-hints/better-resource-hints.php on line 14
- > PHP Fatal error
Uncaught Error: Class 'BetterResourceHints\\Utilities' not found in wp-content/plugins/better-resource-hints/src/inc/prefetched-server-push.php:4
- > PHP Fatal error
Uncaught Error: Class 'BetterResourceHints\\Utilities' not found in wp-content/plugins/better-resource-hints/src/inc/preconnect-server-push.php:4
- > PHP Fatal error
Uncaught Error: Class 'BetterResourceHints\\Utilities' not found in wp-content/plugins/better-resource-hints/src/inc/preloaded-server-push.php:4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/better-resource-hints/better-resource-hints.php on line 14
- > PHP Warning
require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/better-resource-hints/better-resource-hints.php on line 14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Screenshots: These screenshots need descriptions #1, #2, #3 in better-resource-hints/assets to your readme.txt
- Donate link: Invalid url: "paypal.me/alexmacarthur"
better-resource-hints/better-resource-hints.php Passed 13 tests
The main PHP file in "Better Resource Hints" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
90 characters long description:
Easy preloading, prefetching, HTTP/2 server pushing, and more for your CSS and JavaScript.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin979 lines of code in 31 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 139 | 133 | 714 |
Sass | 5 | 43 | 0 | 211 |
JavaScript | 3 | 9 | 0 | 26 |
JSON | 1 | 0 | 0 | 23 |
SVG | 4 | 0 | 0 | 4 |
CSS | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 6.86 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 20.00 |
Average method complexity | 2.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 33 | |
▷ Static methods | 8 | 24.24% |
▷ Public methods | 31 | 93.94% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 6.06% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin