84% blockly

Code Review | Blockly - Gutenberg Blocks

WordPress plugin Blockly - Gutenberg Blocks scored84%from 54 tests.

About plugin

  • Plugin page: blockly
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2021
  • Latest release: Oct 5, 2023
  • Number of updates: 19
  • Update frequency: every 38.4 days
  • Top authors: themeim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /6,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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.48ms] Passed 4 tests

Server-side resources used by Blockly - Gutenberg Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.56 ▼3.69
Dashboard /wp-admin3.37 ▲0.0344.28 ▼17.56
Posts /wp-admin/edit.php3.49 ▲0.1346.39 ▼2.09
Add New Post /wp-admin/post-new.php5.97 ▲0.08125.00 ▲37.49
Media Library /wp-admin/upload.php3.30 ▲0.0733.28 ▼2.56

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 114 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Blockly - Gutenberg Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.69 ▼0.691.66 ▼0.3040.31 ▼8.87
Dashboard /wp-admin2,203 ▲155.81 ▲0.9098.24 ▼20.4442.37 ▼3.87
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0839.42 ▲2.6936.10 ▲1.59
Add New Post /wp-admin/post-new.php6,294 ▲4,77520.47 ▼2.80866.67 ▲187.1560.10 ▲7.94
Media Library /wp-admin/upload.php1,391 ▼04.14 ▼0.0394.18 ▼9.4543.21 ▼0.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blockly/src/blocks/alert/index.php:46

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #7 (Alert or Notice box block), #8 (FAQs)
The official readme.txt is a good inspiration

blockly/class-blockly.php 92% from 13 tests

"Blockly - Gutenberg Blocks" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("blockly.php" instead of "class-blockly.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
There were no executable files found in this plugin16,829 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript761,7911,51012,880
Sass20426562,090
CSS3200961,532
PHP784265327

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods26
▷ Static methods311.54%
▷ Public methods2492.31%
▷ Protected methods00.00%
▷ Private methods27.69%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
PNG images were not found in this plugin