78% vk-blocks

Code Review | VK Blocks

WordPress plugin VK Blocks scored78%from 54 tests.

About plugin

  • Plugin page: vk-blocks
  • Plugin version: 1.64.1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4
  • WordPress version: 6.3.1
  • First release: Nov 26, 2018
  • Latest release: Nov 8, 2023
  • Number of updates: 394
  • Update frequency: every 4.6 days
  • Top authors: vektor-inc (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80,000+ active /2,072,618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.94MB] [CPU: ▲26.24ms] Passed 4 tests

This is a short check of server-side resources used by VK Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.45 ▲1.9872.96 ▲31.10
Dashboard /wp-admin5.24 ▲1.94243.92 ▲192.06
Posts /wp-admin/edit.php5.29 ▲1.9271.32 ▲19.27
Add New Post /wp-admin/post-new.php8.63 ▲2.73117.49 ▲22.03
Media Library /wp-admin/upload.php5.16 ▲1.9267.04 ▲32.56
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins5.2655.16
VK Blocks /wp-admin/options-general.php?page=vk_blocks_options5.61248.33

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 538 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
vk_css_optimize_options
db_upgraded
theysaidso_admin_options
vk_font_awesome_version
widget_recent-comments
vk_blocks_options

Browser metrics Passed 4 tests

Checking browser requirements for VK Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲20714.79 ▲0.483.50 ▲1.8345.04 ▲3.31
Dashboard /wp-admin2,314 ▲1405.88 ▲0.33104.93 ▲4.7893.53 ▲41.86
Posts /wp-admin/edit.php2,174 ▲742.32 ▲0.3542.26 ▲0.6139.47 ▲3.96
Add New Post /wp-admin/post-new.php1,613 ▲8723.98 ▲0.77703.04 ▲65.3137.12 ▼19.79
Media Library /wp-admin/upload.php1,471 ▲684.46 ▲0.20104.40 ▲4.5847.39 ▲4.27
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0282.0627.8829.94
VK Blocks /wp-admin/options-general.php?page=vk_blocks_options2,25813.29464.30135.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • vk_blocks_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • vk_css_optimize_options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • vk_font_awesome_version

Smoke tests 50% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 73× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-blocks/inc/vk-customize-helpers/package/vk-customize-helpers.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'VektorInc\\VK_Admin\\VkAdmin' not found in wp-content/plugins/vk-blocks/inc/vk-blocks/admin/admin.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\PucFactory' not found in wp-content/plugins/vk-blocks/vendor/yahnis-elsts/plugin-update-checker/Puc/v5/PucFactory.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\DebugBar\\Panel' not found in wp-content/plugins/vk-blocks/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/DebugBar/ThemePanel.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VektorInc\\VK_Breadcrumb\\VkBreadcrumb' not found in wp-content/plugins/vk-blocks/vendor/vektor-inc/vk-breadcrumb/tests/test-vk-breadcrumb.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\Plugin\\UpdateChecker' not found in wp-content/plugins/vk-blocks/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/Vcs/PluginUpdateChecker.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/vk-blocks/vendor/vektor-inc/vk-css-optimize/src/CustomTextControl.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-blocks/inc/vk-blocks/build/blocks/staff/index.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VektorInc\\VK_Color_Palette_Manager\\add_action() in wp-content/plugins/vk-blocks/vendor/vektor-inc/vk-color-palette-manager/src/VkColorPaletteManager.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/vk-blocks/inc/vk-blocks/extensions/core/list.php:85

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=vk_blocks_options
    • > Console-api (severe) in wp-includes/js/dist/data.min.js?ver=ff7eb3945f963be850ff+1:19276
    Store \"vk-blocks/block-editor\" is already registered.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Screenshots: Please describe screenshot #2 in vk-blocks/assets to your readme.txt
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

vk-blocks/vk-blocks.php Passed 13 tests

This is the main PHP file of "VK Blocks" version 1.64.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
This is a plugin that extends Block Editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin69,373 lines of code in 417 files:
LanguageFilesBlank linesComment linesLines of code
PHP1313,0857,07715,195
CSS401,4917613,127
PO File564,3116,82012,302
Sass1371,6571,4119,645
SVG110178,946
JavaScript132,0441,8667,865
JSON24801,567
Markdown31440698
XML24428

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity24.68
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces16
Interfaces1
Traits3
Classes71
▷ Abstract classes57.04%
▷ Concrete classes6692.96%
▷ Final classes00.00%
Methods716
▷ Static methods20728.91%
▷ Public methods53274.30%
▷ Protected methods16222.63%
▷ Private methods223.07%
Functions111
▷ Named functions8980.18%
▷ Anonymous functions2219.82%
Constants28
▷ Global constants1139.29%
▷ Class constants1760.71%
▷ Public constants17100.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
5 PNG files occupy 0.21MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png98.17KB24.87KB▼ 74.67%
inc/vk-blocks/admin/images/vk-blocks-logo.png7.94KB4.51KB▼ 43.22%
inc/vk-blocks/build/images/no-image.0a9958a4.png9.74KB4.66KB▼ 52.17%
screenshot-2.png86.41KB23.18KB▼ 73.17%
inc/vk-blocks/images/no-image.png9.74KB4.66KB▼ 52.17%