84% block-pattern-maker

Code Review | Block Pattern Maker

WordPress plugin Block Pattern Maker scored84%from 54 tests.

About plugin

  • Plugin page: block-pattern-maker
  • Plugin version: 2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 17, 2020
  • Latest release: Mar 9, 2021
  • Number of updates: 4
  • Update frequency: every 28.0 days
  • Top authors: rebelwageslave (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /389 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.66ms] Passed 4 tests

An overview of server-side resources used by Block Pattern Maker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.09 ▼2.78
Dashboard /wp-admin3.32 ▼0.0253.63 ▼7.07
Posts /wp-admin/edit.php3.37 ▲0.0252.35 ▼0.07
Add New Post /wp-admin/post-new.php5.97 ▲0.0994.53 ▲2.77
Media Library /wp-admin/upload.php3.25 ▲0.0240.38 ▼0.72
Add New /wp-admin/post-new.php?post_type=dk_block_patterns5.9684.97
Block patterns /wp-admin/edit.php?post_type=dk_block_patterns3.3047.97
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=dk_block_patterns3.4040.83

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
category_children
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Block Pattern Maker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.27 ▼1.041.60 ▼0.0442.18 ▼9.11
Dashboard /wp-admin2,234 ▲465.82 ▼0.0799.28 ▼6.3440.17 ▲0.67
Posts /wp-admin/edit.php2,120 ▲281.97 ▼0.0139.12 ▼2.1736.77 ▲0.55
Add New Post /wp-admin/post-new.php1,568 ▲3518.48 ▼4.59620.41 ▼93.3469.61 ▲5.51
Media Library /wp-admin/upload.php1,419 ▲314.17 ▼0.0094.17 ▼12.3744.65 ▲0.41
Add New /wp-admin/post-new.php?post_type=dk_block_patterns6,21222.36903.7931.10
Block patterns /wp-admin/edit.php?post_type=dk_block_patterns1,1251.9637.9234.83
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=dk_block_patterns1,4712.1428.0134.63

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • category_children
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-pattern-maker/block-pattern-maker.php:64

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 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
2 plugin tags: block-editor-patterns, block-editor

block-pattern-maker/block-pattern-maker.php Passed 13 tests

The main file in "Block Pattern Maker" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
44 characters long description:
Create your own block patterns and use them.

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 plugin40 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121240

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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
Namespaces0
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin