84% di-blocks

Code Review | Di Blocks - Awesome WordPress Blocks for Gutenberg Editor

WordPress plugin Di Blocks - Awesome WordPress Blocks for Gutenberg Editor scored84%from 54 tests.

About plugin

  • Plugin page: di-blocks
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Jun 18, 2020
  • Latest release: Dec 14, 2020
  • Number of updates: 21
  • Update frequency: every 8.6 days
  • Top authors: dithemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /29,945 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.08MB] [CPU: ▼15.62ms] Passed 4 tests

An overview of server-side resources used by Di Blocks - Awesome WordPress Blocks for Gutenberg Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2139.12 ▼3.94
Dashboard /wp-admin3.50 ▲0.1544.64 ▼20.75
Posts /wp-admin/edit.php3.61 ▲0.2547.57 ▲1.51
Add New Post /wp-admin/post-new.php5.01 ▼0.8849.61 ▼39.29
Media Library /wp-admin/upload.php3.42 ▲0.1939.00 ▲4.95

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

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

Browser metrics Passed 4 tests

Di Blocks - Awesome WordPress Blocks for Gutenberg Editor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲14013.66 ▼0.615.85 ▲3.6735.04 ▼10.56
Dashboard /wp-admin2,203 ▲155.80 ▲0.92100.57 ▼14.2038.39 ▼7.22
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.1439.02 ▲2.4534.47 ▼3.58
Add New Post /wp-admin/post-new.php6,202 ▲4,66922.79 ▼0.27899.30 ▲197.2476.93 ▲26.68
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.07101.55 ▲2.8542.46 ▲0.25

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/di-blocks/classes/class-core.php:28
    • > PHP Warning
      require(Di_Blocks_PATHclasses/class-config.php): failed to open stream: No such file or directory in wp-content/plugins/di-blocks/classes/class-helper.php on line 31
    • > PHP Fatal error
      require(): Failed opening required 'Di_Blocks_PATHclasses/class-config.php' (include_path='.:/usr/share/php') in wp-content/plugins/di-blocks/classes/class-helper.php on line 31
    • > PHP Warning
      Use of undefined constant Di_Blocks_PATH - assumed 'Di_Blocks_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/di-blocks/classes/class-helper.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: wordpress blocks, gutenberg blocks, block, blocks, editor blocks

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

"Di Blocks - Awesome WordPress Blocks for Gutenberg Editor" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
50 characters long description:
Awesome Blocks for WordPress ( 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
Good job! No executable or dangerous file extensions detected20,515 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS93,1003310,168
SVG30129,299
PHP621276977
JavaScript317071

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity26.50
▷ Minimum class complexity2.00
▷ Maximum class complexity86.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods29
▷ Static methods1758.62%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin