90% custom-block-patterns

Code Review | Custom Block Patterns

WordPress plugin Custom Block Patterns scored90%from 54 tests.

About plugin

  • Plugin page: custom-block-patt...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Aug 15, 2020
  • Latest release: Jun 21, 2022
  • Number of updates: 8
  • Update frequency: every 84.4 days
  • Top authors: looswebstudio (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /10,775 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.84ms] Passed 4 tests

An overview of server-side resources used by Custom Block Patterns
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.51 ▼4.01
Dashboard /wp-admin3.36 ▲0.0646.67 ▼1.38
Posts /wp-admin/edit.php3.42 ▲0.0649.19 ▼2.27
Add New Post /wp-admin/post-new.php6.04 ▲0.1697.07 ▲4.67
Media Library /wp-admin/upload.php3.30 ▲0.0734.94 ▲0.30
Pattern Category /wp-admin/edit-tags.php?taxonomy=loos-cbp-category&post_type=loos-cbp3.2934.75
Block Patterns /wp-admin/edit.php?post_type=loos-cbp3.3435.68

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Custom Block Patterns
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7713.35 ▼0.811.66 ▼0.4844.41 ▼1.94
Dashboard /wp-admin2,237 ▲465.85 ▲0.97107.54 ▲4.3041.90 ▲2.67
Posts /wp-admin/edit.php2,120 ▲342.04 ▼0.0140.12 ▲3.6834.78 ▲3.99
Add New Post /wp-admin/post-new.php1,540 ▲717.58 ▼5.65622.54 ▼72.1564.10 ▲6.16
Media Library /wp-admin/upload.php1,419 ▲314.15 ▼0.0695.66 ▼5.3442.05 ▼3.24
Pattern Category /wp-admin/edit-tags.php?taxonomy=loos-cbp-category&post_type=loos-cbp1,2902.1327.8028.18
Block Patterns /wp-admin/edit.php?post_type=loos-cbp1,1101.9541.4131.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: guternberg, block pattern

custom-block-patterns/custom-block-patterns.php 92% from 13 tests

The primary PHP file in "Custom Block Patterns" version 1.4.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin196 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP43245131
PO File18937
JSON10028

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin