84% fast-blocks

Code Review | Fast Blocks

WordPress plugin Fast Blocks scored84%from 54 tests.

About plugin

  • Plugin page: fast-blocks
  • Plugin version: 0.8.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9.1
  • WordPress version: 6.3.1
  • First release: May 26, 2021
  • Latest release: Apr 19, 2022
  • Number of updates: 22
  • Update frequency: every 15.0 days
  • Top authors: tdesero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /613 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.33ms] Passed 4 tests

Analyzing server-side resources used by Fast Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0347.42 ▲5.74
Dashboard /wp-admin3.33 ▼0.0153.06 ▼10.73
Posts /wp-admin/edit.php3.45 ▲0.0948.15 ▼4.94
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.57 ▼16.51
Media Library /wp-admin/upload.php3.26 ▲0.0341.42 ▲2.85

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

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

Browser metrics Passed 4 tests

Fast Blocks: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4313.24 ▼1.152.07 ▼0.0341.80 ▲0.95
Dashboard /wp-admin2,221 ▲184.79 ▼0.12113.64 ▲1.4742.01 ▼0.90
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0233.90 ▼7.3233.41 ▼5.04
Add New Post /wp-admin/post-new.php1,531 ▼2422.83 ▲4.45689.36 ▲67.9854.92 ▼8.49
Media Library /wp-admin/upload.php1,403 ▲34.22 ▼0.0297.91 ▼7.5345.18 ▼2.51

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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)
Good news, no errors were detected

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fast-blocks/fast-blocks.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
1 plugin tags: block

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

The main PHP file in "Fast Blocks" ver. 0.8.6 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
Create Custom Gutenberg Blocks fast and easily in PHP.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,122 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript236655752
Sass1320192
PHP64694177
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.67
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.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
No PNG images were found in this plugin