Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
- Install procedure validation failed for this plugin
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, function 'Pantheon\DecoupledPreview\set_default_options' not found or invalid function name
Server metrics [RAM: ▲0.15MB] [CPU: ▼2.03ms] Passed 4 tests
A check of server-side resources used by Decoupled Preview
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.13 | 49.99 ▼4.62 |
Dashboard /wp-admin | 3.45 ▲0.15 | 64.72 ▼0.05 |
Posts /wp-admin/edit.php | 3.57 ▲0.21 | 65.71 ▲7.31 |
Add New Post /wp-admin/post-new.php | 6.04 ▲0.15 | 123.73 ▲9.38 |
Media Library /wp-admin/upload.php | 3.38 ▲0.15 | 43.52 ▼10.77 |
Preview Sites /wp-admin/options-general.php?page=preview_sites | 3.37 | 42.06 |
Preview Sites /wp-admin/admin.php?page=delete_preview_site | 3.32 | 39.25 |
/wp-admin/options-general.php?page=add_preview_sites | 3.32 | 37.65 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Decoupled Preview
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,809 ▲9 | 14.81 ▲1.16 | 1.90 ▼0.01 | 47.11 ▼4.22 |
Dashboard /wp-admin | 2,215 ▲32 | 4.83 ▼1.08 | 116.56 ▼3.70 | 43.38 ▼0.24 |
Posts /wp-admin/edit.php | 2,101 ▲12 | 2.06 ▲0.02 | 39.94 ▼3.09 | 34.68 ▼8.10 |
Add New Post /wp-admin/post-new.php | 1,542 ▲9 | 21.07 ▼1.95 | 744.18 ▲64.58 | 61.25 ▲11.84 |
Media Library /wp-admin/upload.php | 1,397 ▲12 | 4.19 ▲0.05 | 123.71 ▼3.43 | 54.99 ▲1.55 |
Preview Sites /wp-admin/options-general.php?page=preview_sites | 971 | 2.05 | 28.13 | 34.00 |
Preview Sites /wp-admin/admin.php?page=delete_preview_site | 666 | 1.53 | 7.21 | 30.88 |
/wp-admin/options-general.php?page=add_preview_sites | 667 | 1.14 | 10.63 | 25.20 |
Uninstaller [IO: ✅] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin did not uninstall without warnings or errors
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, function 'Pantheon\DecoupledPreview\delete_default_options' not found or invalid function name
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function Pantheon\\DecoupledPreview\\wp_verify_nonce() in wp-content/plugins/decoupled-preview/templates/preview-template.php:14
- > PHP Fatal error
Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/decoupled-preview/src/class-list-table.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: preview, decoupled, nextjs, headless
decoupled-preview/wp-decoupled-preview.php 77% from 13 tests
The main PHP file in "Decoupled Preview" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("decoupled-preview.php" instead of "wp-decoupled-preview.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Domain Path: The domain path folder does not exist ("/languages")
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
Everything looks great! No dangerous files found in this plugin1,137 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 103 | 325 | 679 |
Markdown | 1 | 58 | 0 | 281 |
Bourne Shell | 1 | 21 | 11 | 119 |
JavaScript | 1 | 2 | 16 | 33 |
CSS | 1 | 4 | 1 | 25 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 50.00 |
▷ Minimum class complexity | 17.00 |
▷ Maximum class complexity | 83.00 |
Average method complexity | 4.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 31 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 30 | 96.77% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 3.23% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected