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.16MB] [CPU: ▼3.14ms] Passed 4 tests
Analyzing server-side resources used by Pattern
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.63 ▲0.16 | 42.50 ▲3.46 |
Dashboard /wp-admin | 3.46 ▲0.16 | 49.90 ▼3.93 |
Posts /wp-admin/edit.php | 3.58 ▲0.22 | 50.29 ▲1.83 |
Add New Post /wp-admin/post-new.php | 6.05 ▲0.16 | 90.48 ▼13.21 |
Media Library /wp-admin/upload.php | 3.39 ▲0.15 | 37.07 ▲2.74 |
Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Pattern
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,866 ▲95 | 14.48 ▲0.10 | 1.61 ▼0.39 | 41.66 ▼1.59 |
Dashboard /wp-admin | 2,261 ▲73 | 5.88 ▼0.01 | 105.29 ▼27.54 | 41.52 ▼7.64 |
Posts /wp-admin/edit.php | 2,144 ▲52 | 2.05 ▲0.04 | 41.17 ▼0.25 | 31.97 ▼1.51 |
Add New Post /wp-admin/post-new.php | 1,537 ▲23 | 23.06 ▲5.35 | 620.55 ▼46.30 | 75.31 ▲4.76 |
Media Library /wp-admin/upload.php | 1,464 ▲76 | 4.20 ▲0.02 | 130.85 ▲20.44 | 49.14 ▲6.32 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
Smoke tests 75% from 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)
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 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
Please take a closer look at the following
- 9× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pattern/includes/block-patterns/faq/columns.php:82
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pattern/includes/block-patterns/pricing-table/stacked.php:105
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pattern/includes/block-patterns/faq/blocks.php:140
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pattern/includes/block-patterns/faq/sidebar.php:136
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pattern/includes/block-patterns/pricing-table/cover.php:41
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pattern/includes/block-patterns/pricing-table/simple.php:115
- > PHP Fatal error
Uncaught Error: Call to undefined function Pattern\\plugin_dir_path() in wp-content/plugins/pattern/Plugin.php:89
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pattern/includes/block-patterns/faq/side-by-side.php:72
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/pattern/includes/block-patterns/pricing-table/floating.php:131
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% 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
6 plugin tags: block patterns, sections, section, pattern, patterns...
pattern/Plugin.php 77% from 13 tests
"Pattern" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Domain Path: The domain path points to an invalid folder, "/languages" does not exist
- Requires PHP: Required version does not match the one declared in readme.txt ("7.0.0" instead of "7.0")
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pattern.php" instead of "Plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,680 lines of code in 32 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 23 | 389 | 416 | 1,324 |
CSS | 4 | 78 | 38 | 305 |
Sass | 2 | 5 | 12 | 44 |
JSON | 1 | 0 | 0 | 4 |
JavaScript | 2 | 3 | 9 | 3 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 9.62 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 2.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 50 | |
▷ Static methods | 18 | 36.00% |
▷ Public methods | 48 | 96.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 4.00% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
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
All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
src/assets/img/faq-blocks-icon-6.png | 16.96KB | 4.54KB | ▼ 73.21% |
src/assets/img/faq-blocks-icon-3.png | 15.31KB | 4.62KB | ▼ 69.84% |
src/assets/img/faq-blocks-icon-1.png | 9.29KB | 1.50KB | ▼ 83.84% |
src/assets/img/faq-blocks-icon-5.png | 11.59KB | 2.15KB | ▼ 81.42% |
src/assets/img/faq-blocks-icon-4.png | 7.92KB | 1.06KB | ▼ 86.62% |