Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.10MB] [CPU: ▼142.57ms] Passed 4 tests
Analyzing server-side resources used by Headroom.js
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.87 ▲0.15 | 50.12 ▲18.55 |
Dashboard /wp-admin | 3.14 ▲0.09 | 53.26 ▼17.44 |
Posts /wp-admin/edit.php | 3.25 ▲0.15 | 52.46 ▲6.39 |
Add New Post /wp-admin/post-new.php | 5.50 ▲0.07 | 104.63 ▼569.73 |
Media Library /wp-admin/upload.php | 3.09 ▲0.08 | 45.43 ▲10.52 |
Headroom /wp-admin/tools.php?page=hr_settings | 3.06 | 36.92 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for Headroom.js
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,684 ▲88 | 15.96 ▲0.31 | 10.74 ▼1.10 | 50.37 ▼7.32 |
Dashboard /wp-admin | 2,972 ▲41 | 5.95 ▲0.01 | 153.63 ▼22.80 | 115.90 ▼6.78 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.71 ▼0.01 | 74.46 ▲2.73 | 93.35 ▼9.49 |
Add New Post /wp-admin/post-new.php | 1,686 ▲3 | 18.45 ▲2.32 | 432.14 ▼26.15 | 118.31 ▼1.39 |
Media Library /wp-admin/upload.php | 1,812 ▲2 | 5.04 ▲0.02 | 180.57 ▲21.12 | 134.90 ▲15.00 |
Headroom /wp-admin/tools.php?page=hr_settings | 1,232 | 3.80 | 89.68 | 94.37 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully
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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/headroomjs/headroom.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Plugin Name: Please specify the plugin name on the first line (
=== headroomjs ===
)
headroomjs/headroom.php 92% from 13 tests
This is the main PHP file of "Headroom.js" version 0.1, 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: The principal plugin file should be the same as the plugin slug ("headroomjs.php" instead of "headroom.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected556 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 94 | 165 | 358 |
CSS | 2 | 22 | 3 | 196 |
JavaScript | 1 | 3 | 10 | 2 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 35.50 |
▷ Minimum class complexity | 26.00 |
▷ Maximum class complexity | 45.00 |
Average method complexity | 3.38 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.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 | 29 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 29 | 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 | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin