10% advanced-custom-blocks

Code Review | Advanced Custom Blocks

WordPress plugin Advanced Custom Blocks scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-custom-b...
  • Plugin version: 0.1
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9
  • WordPress version: 5.9.2
  • First release: Aug 3, 2018
  • Latest release: Nov 14, 2018
  • Number of updates: 8
  • Update frequency: every 12.8 days
  • Top authors: rheinardkorf (75%)lukecarbis (37.5%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,052 total downloads


Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/advanced-custom-blocks/advanced-custom-blocks.php+95
    Uncaught Error: Class 'AdvancedCustomBlocks\View\Admin_Menu' not found in wp-content/plugins/advanced-custom-blocks/advanced-custom-blocks.php:95
    Stack trace:
    #0 wp-admin/includes/plugin.php(2288): include_once()
    #1 wp-admin/includes/plugin.php(659): plugin_sandbox_scrape()

Server metrics [RAM: ▼0.02MB] [CPU: ▼306.35ms] Passed 4 tests

Analyzing server-side resources used by Advanced Custom Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.97 ▲5.71
Dashboard /wp-admin3.41 ▲0.0033.76 ▼5.98
Posts /wp-admin/edit.php3.65 ▲0.0042.79 ▲5.76
Add New Post /wp-admin/post-new.php6.88 ▼0.0993.96 ▼1,223.93
Media Library /wp-admin/upload.php3.30 ▲0.0025.24 ▼1.21

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Blocks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5016.24 ▲0.656.11 ▲0.112.90 ▲0.43
Dashboard /wp-admin2,892 ▲316.17 ▼0.05118.80 ▼16.93156.34 ▼4.28
Posts /wp-admin/edit.php2,694 ▲63.24 ▼0.0064.40 ▼1.89145.07 ▲1.85
Add New Post /wp-admin/post-new.php1,690 ▼2121.21 ▲0.08438.60 ▲12.63154.59 ▼6.17
Media Library /wp-admin/upload.php1,698 ▼35.49 ▲0.03145.42 ▼0.28188.60 ▲5.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'AdvancedCustomBlocks\\ComponentInterface' not found in wp-content/plugins/advanced-custom-blocks/php/class-componentabstract.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'AdvancedCustomBlocks\\PluginInterface' not found in wp-content/plugins/advanced-custom-blocks/php/class-pluginabstract.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\PluginAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/class-plugin.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\ComponentAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/posttypes/class-block-post-type.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\ComponentAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/endpoints/class-preview.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\ComponentAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/blocks/class-loader.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AdvancedCustomBlocks\\ComponentAbstract' not found in wp-content/plugins/advanced-custom-blocks/php/view/class-admin-menu.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: gutenberg, blocks

advanced-custom-blocks/advanced-custom-blocks.php 85% from 13 tests

The main PHP file in "Advanced Custom Blocks" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,295 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.82
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods64100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions770.00%
▷ Anonymous functions330.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected