67% acf-blocks

Code Review | Gutenberg Blocks - ACF Blocks Suite

WordPress plugin Gutenberg Blocks - ACF Blocks Suite scored 67% from 54 tests.

About plugin

  • Plugin page: acf-blocks
  • Plugin version: 2.6.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.9.2
  • First release: Apr 18, 2019
  • Latest release: Mar 8, 2022
  • Number of updates: 45
  • Update frequency: every 23.5 days
  • Top authors: munirkamal (97.78%)deliciousbrains (4.44%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active / 21,795 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲4.73MB] [CPU: ▼284.74ms] Passed 4 tests

A check of server-side resources used by Gutenberg Blocks - ACF Blocks Suite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.65 ▲5.1382.99 ▼19.00
Dashboard /wp-admin8.66 ▲5.2666.93 ▲28.77
Posts /wp-admin/edit.php8.67 ▲5.0364.88 ▲23.37
Add New Post /wp-admin/post-new.php10.49 ▲3.52125.90 ▼1,169.00
Media Library /wp-admin/upload.php8.66 ▲5.3751.79 ▲25.68
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.6645.61

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 469 new files
Database: no new tables, 4 new options
New WordPress options
fs_gdpr
fs_accounts
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gutenberg Blocks - ACF Blocks Suite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,822 ▲6816.05 ▲0.405.88 ▼0.632.51 ▲0.29
Dashboard /wp-admin2,946 ▲866.18 ▲0.06117.14 ▼9.88172.26 ▲4.52
Posts /wp-admin/edit.php2,746 ▲893.26 ▲0.0262.74 ▼2.26157.99 ▲18.77
Add New Post /wp-admin/post-new.php1,797 ▲8615.69 ▼5.69406.79 ▼55.17186.78 ▼13.76
Media Library /wp-admin/upload.php1,754 ▲595.59 ▲0.13154.35 ▼3.84228.15 ▲6.60
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4572.5853.93120.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/acf-blocks/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 4 options in the database
    • fs_gdpr
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/acf-blocks/extendify-sdk/app/Controllers/UserController.php
    • > /wp-content/plugins/acf-blocks/extendify-sdk/app/Controllers/TaxonomyController.php
    • > /wp-content/plugins/acf-blocks/extendify-sdk/app/Controllers/TemplateController.php
    • > /wp-content/plugins/acf-blocks/extendify-sdk/app/Controllers/PluginController.php
    • > /wp-content/plugins/acf-blocks/extendify-sdk/app/Controllers/AuthController.php
    • > /wp-content/plugins/acf-blocks/extendify-sdk/bootstrap.php
    • > /wp-content/plugins/acf-blocks/extendify-sdk/routes/api.php
    • > /wp-content/plugins/acf-blocks/extendify-sdk/app/Controllers/PingController.php
  • 37× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acfb_margin_name() in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-facebook-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function parse_link() in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-team.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function parse_link() in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-divider.php:12
    • > PHP Notice
      Undefined variable: block in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-fb-like-button.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function parse_link() in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-pricingbox.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function parse_link() in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-accordion.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/acf-blocks/extendify-sdk/app/Plugin.php on line 218
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acfb_margin_name() in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-fb-like-button.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function parse_link() in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-posts.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function parse_link() in wp-content/plugins/acf-blocks/acfblocks-templates/free/acfb-progressbar.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: block, gutenberg block, acf block, editor, acf...

acf-blocks/acf-blocks.php 85% from 13 tests

"Gutenberg Blocks - ACF Blocks Suite" version 2.6.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin106,324 lines of code in 331 files:
LanguageFilesBlank linesComment linesLines of code
JSON470060,884
PHP1648,96317,93036,182
JavaScript828395224,618
CSS196941914,241
YAML3172179
XML12138120
Markdown322088
SVG120012

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity61.84
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes69
▷ Abstract classes22.90%
▷ Concrete classes6797.10%
▷ Final classes22.99%
Methods1,250
▷ Static methods21116.88%
▷ Public methods90172.08%
▷ Protected methods171.36%
▷ Private methods33226.56%
Functions161
▷ Named functions13080.75%
▷ Anonymous functions3119.25%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.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
89 PNG files occupy 1.38MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/is/style20.png1.08KB1.08KB0.00%
img/photo-grid-icons.png1.62KB0.89KB▼ 45.18%
img/gfour-twelve.png0.55KB0.11KB▼ 80.46%
img/is/style51.png1.28KB1.28KB0.00%
img/is/style26.png1.05KB1.05KB0.00%