84% blocks-for-gutenberg

Code Review | Blocks for Gutenberg

WordPress plugin Blocks for Gutenberg scored 84% from 54 tests.

About plugin

  • Plugin page: blocks-for-gutenberg
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 9, 2017
  • Latest release: Dec 9, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: Kubitomakita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,937 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.62ms] Passed 4 tests

This is a short check of server-side resources used by Blocks for Gutenberg
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.20 ▼9.61
Dashboard /wp-admin3.31 ▲0.0146.34 ▼5.31
Posts /wp-admin/edit.php3.36 ▲0.0146.74 ▼0.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.13 ▲10.72
Media Library /wp-admin/upload.php3.23 ▲0.0138.56 ▲5.30

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Blocks for Gutenberg
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.17 ▼1.041.69 ▼0.3943.60 ▼2.18
Dashboard /wp-admin2,209 ▲244.83 ▼0.0699.79 ▼13.8640.35 ▼1.28
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0435.38 ▲0.0530.41 ▼4.81
Add New Post /wp-admin/post-new.php1,532 ▼1018.32 ▲0.01615.69 ▼29.4261.06 ▼9.74
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0593.45 ▼15.3040.25 ▼6.13

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocks-for-gutenberg/blocks/sidenote/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocks-for-gutenberg/blocks/sidenote/index.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: blocks, gutenberg, editor, block

blocks-for-gutenberg/blocks-for-gutenberg.php Passed 13 tests

The principal PHP file in "Blocks for Gutenberg" v. 1.0.0 is loaded by WordPress automatically on each request
34 characters long description:
Custom blocks for Gutenberg editor

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin93 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript110039
CSS11027
PHP29927

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin