83% vk-dynamic-if-block

Code Review | VK Dynamic If Block

WordPress plugin VK Dynamic If Block scored83%from 54 tests.

About plugin

  • Plugin page: vk-dynamic-if-block
  • Plugin version: 0.6.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2023
  • Latest release: Aug 23, 2023
  • Number of updates: 24
  • Update frequency: every 4.9 days
  • Top authors: vektor-inc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,272 total downloads

Benchmarks

Plugin footprint 82% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.17ms] Passed 4 tests

Server-side resources used by VK Dynamic If Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.67 ▼6.06
Dashboard /wp-admin3.40 ▲0.0653.62 ▼10.43
Posts /wp-admin/edit.php3.52 ▲0.1649.15 ▼0.17
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.75 ▼8.03
Media Library /wp-admin/upload.php3.33 ▲0.1042.70 ▲5.57

Server storage [IO: ▲0.54MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/vk-dynamic-if-block/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for VK Dynamic If Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.44 ▲0.182.33 ▲0.4948.92 ▲10.59
Dashboard /wp-admin2,221 ▲185.81 ▼0.09106.60 ▼6.2139.62 ▼4.15
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0035.35 ▼1.2935.98 ▼1.37
Add New Post /wp-admin/post-new.php6,367 ▲4,83627.83 ▲4.69956.95 ▲305.7662.22 ▲6.82
Media Library /wp-admin/upload.php1,397 ▼34.26 ▲0.12101.90 ▼12.6144.83 ▼2.81

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-dynamic-if-block/build/index.php:314

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Block settings in the editor sidebar.), #2 (Dynamic If block in the site editor.), #3 (Dynamic If block in the site editor.)
Please take inspiration from this readme.txt

vk-dynamic-if-block/vk-dynamic-if-block.php 92% from 13 tests

The main PHP file in "VK Dynamic If Block" ver. 0.6.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 188 characters long)

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
Success! There were no dangerous files found in this plugin997 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12197441886
JSON200109
CSS1001
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity23.25
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1946.34%
▷ Public methods3892.68%
▷ Protected methods00.00%
▷ Private methods37.32%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.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
3 PNG files occupy 0.45MB with 0.29MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png99.97KB38.32KB▼ 61.67%
screenshot-3.png184.90KB62.59KB▼ 66.15%
screenshot-2.png180.16KB60.74KB▼ 66.29%