Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.15MB] [CPU: ▼292.09ms] Passed 4 tests
An overview of server-side resources used by Headless WordPress
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.75 ▲0.24 | 86.89 ▲26.77 |
Dashboard /wp-admin | 3.59 ▲0.18 | 36.48 ▲2.28 |
Posts /wp-admin/edit.php | 3.81 ▲0.17 | 41.89 ▲3.14 |
Add New Post /wp-admin/post-new.php | 7.06 ▲0.08 | 94.74 ▼1,181.32 |
Media Library /wp-admin/upload.php | 3.47 ▲0.17 | 32.09 ▲7.56 |
Server storage [IO: ▲2.42MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by Headless WordPress
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,787 ▲33 | 15.52 ▼0.53 | 6.84 ▲0.15 | 2.33 ▼0.38 |
Dashboard /wp-admin | 2,917 ▲49 | 6.34 ▲0.22 | 128.98 ▼54.32 | 197.00 ▲25.83 |
Posts /wp-admin/edit.php | 2,694 ▲9 | 3.25 ▲0.02 | 107.85 ▲38.83 | 155.94 ▼58.80 |
Add New Post /wp-admin/post-new.php | 1,677 ▼13 | 20.43 ▼0.46 | 449.21 ▼11.97 | 233.73 ▲22.01 |
Media Library /wp-admin/upload.php | 1,718 ▲23 | 5.72 ▲0.20 | 165.15 ▼1.13 | 286.59 ▲51.99 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
SRP Passed 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
The SRP test was a success
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 96% from 29 tests
readme.txt Passed 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
5 plugin tags: disable frontend, headless, headless cms, headless wp, rest api
headless-wp/headless-site.php 92% from 13 tests
The principal PHP file in "Headless WordPress" v. 1.0.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("headless-wp.php" instead of "headless-site.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin15,140 lines of code in 21 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 5 | 1,236 | 25 | 9,488 |
JavaScript | 6 | 1,142 | 640 | 4,423 |
PHP | 10 | 310 | 24 | 1,229 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 16.60 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 98.00 |
Average method complexity | 4.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 46.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 51 | |
▷ Static methods | 19 | 37.25% |
▷ Public methods | 48 | 94.12% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 5.88% |
Functions | 4 | |
▷ Named functions | 3 | 75.00% |
▷ Anonymous functions | 1 | 25.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/logo.png | 2.84KB | 1.59KB | ▼ 44.03% |
admin/images/miniorange.png | 0.44KB | 0.35KB | ▼ 18.61% |
admin/images/flags16.png | 61.80KB | 19.90KB | ▼ 67.79% |