90% k2-blocks

Code Review | K2 Blocks

WordPress plugin K2 Blocks scored90%from 54 tests.

About plugin

  • Plugin page: k2-blocks
  • Plugin version: 1.0.12
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: Oct 23, 2023
  • Number of updates: 23
  • Update frequency: every 54.4 days
  • Top authors: pookidevs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,364 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.25MB] [CPU: ▼11.44ms] Passed 4 tests

Server-side resources used by K2 Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0533.51 ▼1.12
Dashboard /wp-admin3.34 ▼0.0149.99 ▼8.42
Posts /wp-admin/edit.php3.40 ▲0.0346.80 ▼0.36
Add New Post /wp-admin/post-new.php4.84 ▼1.0547.24 ▼35.87
Media Library /wp-admin/upload.php3.27 ▲0.0341.24 ▲6.92

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for K2 Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.71 ▲0.343.39 ▲1.8336.67 ▼4.66
Dashboard /wp-admin2,224 ▲475.70 ▲0.1278.09 ▼8.8573.46 ▲35.67
Posts /wp-admin/edit.php2,133 ▲332.01 ▼0.0136.16 ▲0.4835.59 ▲0.46
Add New Post /wp-admin/post-new.php6,449 ▲4,92334.16 ▲10.57985.00 ▲291.6953.95 ▲5.74
Media Library /wp-admin/upload.php1,420 ▲264.17 ▼0.06113.17 ▲15.7584.79 ▲40.31

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: page builder, blocks, widgets, gutenberg

k2-blocks/plugin.php 92% from 13 tests

The main PHP file in "K2 Blocks" ver. 1.0.12 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("k2-blocks.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected12,289 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript271,1451,5379,701
Sass26271341,270
CSS21551741,144
PHP23073174

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected