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
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.10MB] [CPU: ▼4.11ms] Passed 4 tests
Server-side resources used by Block Patterns UI
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.12 | 42.79 ▲0.27 |
Dashboard /wp-admin | 3.40 ▲0.10 | 53.23 ▲0.11 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 48.90 ▲0.68 |
Add New Post /wp-admin/post-new.php | 6.06 ▲0.17 | 87.63 ▼17.48 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 37.99 ▲2.74 |
All Patterns /wp-admin/edit.php?post_type=bpui_block_pattern | 3.36 | 39.29 |
Add New /wp-admin/post-new.php?post_type=bpui_block_pattern | 3.24 | 36.30 |
Settings /wp-admin/edit.php?post_type=bpui_block_pattern&page=block_patterns_ui | 3.32 | 33.37 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Block Patterns UI
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,851 ▲116 | 14.48 ▲0.12 | 1.52 ▼0.56 | 37.98 ▼4.63 |
Dashboard /wp-admin | 2,251 ▲63 | 5.88 ▼0.01 | 102.62 ▼10.25 | 40.18 ▼8.22 |
Posts /wp-admin/edit.php | 2,137 ▲51 | 1.98 ▼0.03 | 36.61 ▲1.85 | 33.52 ▼1.83 |
Add New Post /wp-admin/post-new.php | 1,564 ▲36 | 23.25 ▲5.01 | 657.88 ▲38.28 | 51.78 ▼5.77 |
Media Library /wp-admin/upload.php | 1,434 ▲43 | 4.20 ▲0.06 | 96.70 ▼3.50 | 43.48 ▼0.90 |
All Patterns /wp-admin/edit.php?post_type=bpui_block_pattern | 1,104 | 1.98 | 33.94 | 26.86 |
Add New /wp-admin/post-new.php?post_type=bpui_block_pattern | 6,534 | 19.88 | 955.60 | 35.27 |
Settings /wp-admin/edit.php?post_type=bpui_block_pattern&page=block_patterns_ui | 1,034 | 2.14 | 36.20 | 30.95 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
Smoke tests 25% 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/post-new.php?post_type=bpui_block_pattern
- > Notice in wp-content/plugins/block-patterns-ui/lib/add-meta-boxes.php+101
Undefined index: bpui_pattern_settings_fields
- 20 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=bpui_block_pattern&page=block_patterns_ui
- > Notice in wp-content/plugins/block-patterns-ui/templates/settings.php+34
Trying to access array offset on value of type bool
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/block-patterns-ui/templates/partials/header.php
- > /wp-content/plugins/block-patterns-ui/templates/partials/footer.php
- 10× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-patterns-ui/lib/admin-assets.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-patterns-ui/lib/register-block-patterns.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-patterns-ui/lib/admin-columns.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-patterns-ui/lib/init.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-patterns-ui/lib/admin-settings-page.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/block-patterns-ui/lib/admin-plugin-list.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/block-patterns-ui/templates/partials/page-header.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-patterns-ui/lib/add-meta-boxes.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-patterns-ui/lib/register-custom-post-type.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function bpui_get_pattern_categories() in wp-content/plugins/block-patterns-ui/templates/settings.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: block patterns, block editor, gutenberg
block-patterns-ui/block-patterns-ui.php 92% from 13 tests
The main PHP file in "Block Patterns UI" ver. 0.4.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
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
Good job! No executable or dangerous file extensions detected579 lines of code in 26 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 15 | 93 | 58 | 351 |
CSS | 4 | 4 | 0 | 111 |
Sass | 5 | 6 | 0 | 111 |
JavaScript | 2 | 0 | 0 | 6 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 2.50 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.43 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.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 | 7 | |
▷ Static methods | 2 | 28.57% |
▷ Public methods | 6 | 85.71% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 14.29% |
Functions | 18 | |
▷ Named functions | 5 | 27.78% |
▷ Anonymous functions | 13 | 72.22% |
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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
frontend/logo-h.png | 7.81KB | 4.30KB | ▼ 44.99% |