84% vk-block-patterns

Code Review | VK Block Patterns

WordPress plugin VK Block Patterns scored84%from 54 tests.

About plugin

  • Plugin page: vk-block-patterns
  • Plugin version: 1.31.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2020
  • Latest release: Jul 25, 2023
  • Number of updates: 111
  • Update frequency: every 9.6 days
  • Top authors: vektor-inc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80,000+ active /1,027,932 total downloads

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 gracefully, with no errors

Server metrics [RAM: ▲0.36MB] [CPU: ▲1.46ms] Passed 4 tests

Server-side resources used by VK Block Patterns
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3443.76 ▲1.44
Dashboard /wp-admin3.70 ▲0.40198.49 ▲147.67
Posts /wp-admin/edit.php3.74 ▲0.3854.49 ▲6.24
Add New Post /wp-admin/post-new.php6.58 ▲0.7091.98 ▼5.69
Media Library /wp-admin/upload.php3.55 ▲0.3237.54 ▲3.83
VK Block Patterns /wp-admin/options-general.php?page=vk_block_patterns_options3.57222.79

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 112 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
vk_block_patterns_options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for VK Block Patterns
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲11513.32 ▼1.431.66 ▼0.6841.86 ▼0.37
Dashboard /wp-admin2,281 ▲994.91 ▼1.1096.13 ▼12.1683.05 ▲40.18
Posts /wp-admin/edit.php2,129 ▲402.04 ▼0.0138.64 ▼1.7734.08 ▼2.68
Add New Post /wp-admin/post-new.php1,559 ▲1717.62 ▼0.67650.44 ▲23.7658.42 ▲2.56
Media Library /wp-admin/upload.php1,428 ▲464.18 ▼0.0496.11 ▼7.2042.58 ▼1.01
VK Block Patterns /wp-admin/options-general.php?page=vk_block_patterns_options1,2898.33191.64101.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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 fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VKBlockPatterns\\add_action() in wp-content/plugins/vk-block-patterns/inc/vk-block-patterns/package/class-add-meta-box.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'VektorInc\\VK_Swiper\\VkSwiper' not found in wp-content/plugins/vk-block-patterns/vendor/vektor-inc/vk-admin/config.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_content\\plugins\\vk_block_patterns\\patterns_data\\add_action() in wp-content/plugins/vk-block-patterns/patterns-data/class-register-patterns-from-json.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-block-patterns/favorite-patterns/favorite-patterns.php:85

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

vk-block-patterns/vk-block-patterns.php Passed 13 tests

Analyzing the main PHP file in "VK Block Patterns" version 1.31.0
62 characters long description:
You can make and register your original custom block patterns.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin5,833 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JSON6002,564
PHP223607541,770
Sass1312318925
JavaScript53450422
SVG101120
PO File171226
CSS6006

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity24.50
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods74
▷ Static methods4966.22%
▷ Public methods7195.95%
▷ Protected methods00.00%
▷ Private methods34.05%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
Constants3
▷ Global constants3100.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
13 PNG files occupy 0.42MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
patterns-data/images/x-t9-icon-large-trans.png14.18KB8.91KB▼ 37.14%
patterns-data/images/woocommerce-placeholder.png100.24KB73.05KB▼ 27.12%
patterns-data/images/logo_Lightning.png9.44KB4.57KB▼ 51.54%
patterns-data/images/logo_VK_Block_Patterns.png18.22KB8.11KB▼ 55.48%
patterns-data/images/pr-img.png8.10KB8.06KB▼ 0.53%