83% bokez-awesome-gutenberg-blocks

Code Review | Bokez - Wordpress 5 Blocks

WordPress plugin Bokez - Wordpress 5 Blocks scored83%from 54 tests.

About plugin

  • Plugin page: bokez-awesome-gut...
  • Plugin version: 2.2.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.0
  • WordPress version: 6.3.1
  • First release: Jun 22, 2018
  • Latest release: Dec 26, 2019
  • Number of updates: 39
  • Update frequency: every 14.2 days
  • Top authors: delabon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /7,989 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by Bokez - Wordpress 5 Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2841.77 ▼1.30
Dashboard /wp-admin3.54 ▲0.2449.92 ▲0.41
Posts /wp-admin/edit.php3.65 ▲0.3053.50 ▼5.75
Add New Post /wp-admin/post-new.php4.83 ▼1.0647.27 ▼40.51
Media Library /wp-admin/upload.php3.46 ▲0.2338.82 ▲2.89

Server storage [IO: ▲1.16MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/bokez-awesome-gutenberg-blocks/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 118 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Bokez - Wordpress 5 Blocks: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18513.57 ▼0.716.06 ▲4.0837.28 ▼1.88
Dashboard /wp-admin2,241 ▲415.82 ▲0.0099.34 ▼3.6739.97 ▼1.28
Posts /wp-admin/edit.php2,120 ▲202.05 ▲0.0441.04 ▲2.7336.32 ▲0.77
Add New Post /wp-admin/post-new.php1,503 ▼2320.94 ▲3.52690.70 ▲4.9960.65 ▲5.21
Media Library /wp-admin/upload.php1,423 ▲234.25 ▼0.0496.89 ▼14.0244.06 ▼6.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/dist/panel/init.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/src/blocks/faq/index.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/src/blocks/profile/index.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/src/blocks/video-popup/index.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bokez-awesome-gutenberg-blocks/dist/panel/view.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/src/blocks/blockquote/index.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/src/blocks/section/index.php:155
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/src/blocks/separator-heading/index.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/src/blocks/column/index.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bokez-awesome-gutenberg-blocks/src/blocks/posts-grid/index.php:103

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
8 plugin tags: wordpress 5, gutenberg, wordpress 5 editor, customizable blocks, gutenberg addon...

bokez-awesome-gutenberg-blocks/plugin.php 92% from 13 tests

"Bokez - Wordpress 5 Blocks" version 2.2.2'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: The principal plugin file should be the same as the plugin slug ("bokez-awesome-gutenberg-blocks.php" instead of "plugin.php")

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
No dangerous file extensions were detected7,843 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript471,1302154,315
Sass33413651,821
PHP214152181,434
Markdown1650161
CSS3214112

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions50
▷ Named functions4794.00%
▷ Anonymous functions36.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 0.62MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/panel/img/block-settings.png86.88KB24.81KB▼ 71.45%
dist/panel/img/blockquote-block.png58.26KB22.32KB▼ 61.69%
dist/panel/img/adding-new-block.png81.83KB25.21KB▼ 69.19%
dist/panel/img/gutenberg-install.png79.56KB29.78KB▼ 62.57%
dist/panel/img/memphis-colorful.png21.45KB10.21KB▼ 52.41%