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
Installer ran successfully
Server metrics [RAM: ▲0.47MB] [CPU: ▼10.46ms] Passed 4 tests
This is a short check of server-side resources used by Better Block Patterns
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.03 ▲0.52 | 42.34 ▼1.44 |
Dashboard /wp-admin | 3.86 ▲0.47 | 51.87 ▼18.02 |
Posts /wp-admin/edit.php | 3.91 ▲0.51 | 82.01 ▲25.85 |
Add New Post /wp-admin/post-new.php | 6.38 ▲0.45 | 88.97 ▼24.90 |
Media Library /wp-admin/upload.php | 3.72 ▲0.45 | 39.54 ▲2.51 |
Getting Started /wp-admin/admin.php?page=better-block-patterns | 3.68 | 39.10 |
Settings /wp-admin/admin.php?page=better-block-patterns-settings | 3.68 | 35.51 |
Server storage [IO: ▲3.76MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 174 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
better_block_patterns |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Better Block Patterns
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,812 ▲51 | 14.22 ▼0.14 | 2.12 ▲0.38 | 44.22 ▲4.62 |
Dashboard /wp-admin | 2,221 ▲41 | 5.62 ▲0.02 | 84.76 ▼7.49 | 39.93 ▼6.92 |
Posts /wp-admin/edit.php | 2,126 ▲26 | 2.02 ▲0.04 | 47.49 ▲7.21 | 43.30 ▲6.52 |
Add New Post /wp-admin/post-new.php | 1,548 ▲13 | 23.64 ▲0.32 | 642.03 ▲5.07 | 55.29 ▲3.12 |
Media Library /wp-admin/upload.php | 1,417 ▲14 | 4.22 ▲0.08 | 98.99 ▼1.62 | 45.55 ▲2.99 |
Getting Started /wp-admin/admin.php?page=better-block-patterns | 951 | 1.87 | 35.14 | 55.74 |
Settings /wp-admin/admin.php?page=better-block-patterns-settings | 1,440 | 2.01 | 47.85 | 74.94 |
Uninstaller [IO: ▲0.02MB] [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
Please fix the following items
- Zombie WordPress options detected upon uninstall: 7 options
- better_block_patterns
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- 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
- 35× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_x() in wp-content/plugins/better-block-patterns/patterns/general-features/portfolio-2/block-data.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/better-block-patterns/patterns/general-features/contact-1/block-data.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/better-block-patterns/includes/class-customizer.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/better-block-patterns/patterns/general-features/testimonials-2/block-data.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-block-patterns/includes/customizer/helpers-css.php:269
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/better-block-patterns/patterns/general-features/feature-simple-1/block-data.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-block-patterns/includes/class-blocks-manager.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/better-block-patterns/patterns/general-features/featured-pages-2/block-data.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_x() in wp-content/plugins/better-block-patterns/patterns/general-features/portfolio-1/block-data.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_x() in wp-content/plugins/better-block-patterns/patterns/general-features/contact-2/block-data.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: shortcodes, block patterns, block styles, gutenberg, block templates...
better-block-patterns/better-block-patterns.php 77% from 13 tests
The main file in "Better Block Patterns" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 206 characters long)
- Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
- Domain Path: The domain path must begin with a forward slash character ("/languages")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin15,551 lines of code in 91 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 3 | 0 | 0 | 9,552 |
PHP | 42 | 875 | 664 | 3,266 |
CSS | 39 | 354 | 81 | 1,477 |
JavaScript | 7 | 190 | 159 | 1,256 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 31.62 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 116.00 |
Average method complexity | 5.02 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 1 | 12.50% |
Methods | 61 | |
▷ Static methods | 4 | 6.56% |
▷ Public methods | 49 | 80.33% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 12 | 19.67% |
Functions | 25 | |
▷ Named functions | 25 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
46 PNG files occupy 0.50MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
patterns/general-features/pricing-1/screenshot.png | 14.58KB | 5.83KB | ▼ 60.00% |
assets/images/bbp-logo-dark.png | 1.40KB | 1.48KB | 0.00% |
assets/images/solid-color-6.png | 0.14KB | 0.14KB | 0.00% |
patterns/general-features/description-2/screenshot.png | 14.56KB | 5.82KB | ▼ 60.04% |
assets/images/bbp-doc-step-3.png | 16.32KB | 16.04KB | ▼ 1.71% |