84% beer-blocks

Code Review | Beer Blocks

WordPress plugin Beer Blocks scored84%from 54 tests.

About plugin

  • Plugin page: beer-blocks
  • Plugin version: 1.8.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Sep 29, 2021
  • Latest release: Dec 2, 2023
  • Number of updates: 59
  • Update frequency: every 13.5 days
  • Top authors: egarofalo83 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.78MB] [CPU: ▲6.52ms] Passed 4 tests

Analyzing server-side resources used by Beer Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.29 ▲1.8255.86 ▲10.94
Dashboard /wp-admin5.05 ▲1.7560.75 ▲3.04
Posts /wp-admin/edit.php5.16 ▲1.8064.26 ▲9.02
Add New Post /wp-admin/post-new.php7.98 ▲2.09128.75 ▲17.86
Media Library /wp-admin/upload.php4.97 ▲1.7450.07 ▲3.08

Server storage [IO: ▲1.06MB] [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: 217 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Beer Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14313.91 ▼0.522.34 ▲0.4353.14 ▼0.09
Dashboard /wp-admin2,268 ▲915.63 ▼0.10114.82 ▲8.7353.70 ▲2.42
Posts /wp-admin/edit.php2,177 ▲741.98 ▼0.0448.00 ▼4.2945.74 ▲4.38
Add New Post /wp-admin/post-new.php1,622 ▲9625.85 ▲2.70927.53 ▲57.7749.66 ▼26.44
Media Library /wp-admin/upload.php1,476 ▲764.18 ▲0.01162.08 ▲26.3861.40 ▲1.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include(): Failed opening 'BEERB_PLUGIN_DIR_PATH/inc/helpers/fontawesome.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/beer-blocks/beer-blocks-helpers.php on line 5
    • > PHP Warning
      file_get_contents(BEERB_PLUGIN_DIR_PATH/src/helpers/google-fonts.json): failed to open stream: No such file or directory in wp-content/plugins/beer-blocks/inc/helpers/google-fonts.php on line 14
    • > PHP Warning
      include(): Failed opening 'BEERB_PLUGIN_DIR_PATH/inc/helpers/bootstrap.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/beer-blocks/beer-blocks-helpers.php on line 4
    • > PHP Warning
      Use of undefined constant BEERB_PLUGIN_DIR_PATH - assumed 'BEERB_PLUGIN_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/beer-blocks/inc/helpers/google-fonts.php on line 11
    • > PHP Warning
      file_get_contents(BEERB_PLUGIN_DIR_PATH/src/helpers/safe-fonts.json): failed to open stream: No such file or directory in wp-content/plugins/beer-blocks/inc/helpers/google-fonts.php on line 11
    • > PHP Warning
      include(BEERB_PLUGIN_DIR_PATH/inc/helpers/google-fonts.php): failed to open stream: No such file or directory in wp-content/plugins/beer-blocks/beer-blocks-helpers.php on line 6
    • > PHP Warning
      Use of undefined constant BEERB_PLUGIN_DIR_PATH - assumed 'BEERB_PLUGIN_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/beer-blocks/beer-blocks-helpers.php on line 6
    • > PHP Warning
      Use of undefined constant BEERB_PLUGIN_DIR_PATH - assumed 'BEERB_PLUGIN_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/beer-blocks/beer-blocks-helpers.php on line 3
    • > PHP Warning
      Use of undefined constant BEERB_PLUGIN_DIR_PATH - assumed 'BEERB_PLUGIN_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/beer-blocks/inc/helpers/google-fonts.php on line 14
    • > PHP Warning
      include(): Failed opening 'BEERB_PLUGIN_DIR_PATH/inc/helpers/google-fonts.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/beer-blocks/beer-blocks-helpers.php on line 6

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)
There were no browser issues 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
5 plugin tags: gutenberg, design, blocks, block, blockeditor

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

The entry point to "Beer Blocks" version 1.8.0 is a PHP file that has certain tags in its header comment area
116 characters long description:
Beer Blocks extend the block editor with advanced and powerful blocks that help you build beautiful websites faster.

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 detected21,608 lines of code in 299 files:
LanguageFilesBlank linesComment linesLines of code
JSON4009,188
JavaScript1089458268,275
Sass786252362,649
PHP35113113621
PO File1227505584
Markdown2590194
SVG262051
CSS4513446

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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
Namespaces5
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%
Functions29
▷ Named functions2586.21%
▷ Anonymous functions413.79%
Constants23
▷ Global constants23100.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
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png22.29KB6.60KB▼ 70.38%
assets/icon-256x256.png52.76KB14.83KB▼ 71.90%