83% genesis-custom-blocks

Code Review | Genesis Custom Blocks

WordPress plugin Genesis Custom Blocks scored 83% from 54 tests.

About plugin

  • Plugin page: genesis-custom-bl...
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 5.9.2
  • First release: Sep 1, 2020
  • Latest release: Mar 24, 2022
  • Number of updates: 12
  • Update frequency: every 47.4 days
  • Top authors: studiopress (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

8,000+ active / 57,216 total downloads

Benchmarks

Plugin footprint 83% 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.22MB] [CPU: ▼307.63ms] Passed 4 tests

Server-side resources used by Genesis Custom Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2366.60 ▲9.70
Dashboard /wp-admin3.59 ▲0.1939.33 ▼6.83
Posts /wp-admin/edit.php3.88 ▲0.2446.31 ▲0.52
Add New Post /wp-admin/post-new.php7.20 ▲0.23110.09 ▼1,213.22
Media Library /wp-admin/upload.php3.55 ▲0.2526.33 ▼10.97
Add New /wp-admin/post-new.php?post_type=genesis_custom_block3.5737.36
Genesis Pro /wp-admin/edit.php?post_type=genesis_custom_block&page=genesis-custom-blocks-pro3.5928.17
Settings /wp-admin/edit.php?post_type=genesis_custom_block&page=genesis-custom-blocks-settings3.5525.89
All Blocks /wp-admin/edit.php?post_type=genesis_custom_block3.8735.00
Documentation /wp-admin/edit.php?post_type=genesis_custom_block&page=genesis-custom-blocks-documentation3.4126.43

Server storage [IO: ▲1.12MB] [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: 75 new files
Database: no new tables, 1 new option
New WordPress options
genesis_custom_blocks_example_post_id

Browser metrics Passed 4 tests

Checking browser requirements for Genesis Custom Blocks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,873 ▲14715.86 ▼0.136.49 ▼0.242.50 ▼0.18
Dashboard /wp-admin2,968 ▲1146.11 ▼0.05116.43 ▼18.81155.66 ▼5.99
Posts /wp-admin/edit.php2,744 ▲533.24 ▲0.0163.72 ▲2.35138.45 ▼2.05
Add New Post /wp-admin/post-new.php1,708 ▲1816.47 ▼2.93435.11 ▲41.57160.96 ▲6.37
Media Library /wp-admin/upload.php1,777 ▲795.51 ▼0.00140.99 ▼1.98181.93 ▼7.09
Add New /wp-admin/post-new.php?post_type=genesis_custom_block60612.52217.06137.90
Genesis Pro /wp-admin/edit.php?post_type=genesis_custom_block&page=genesis-custom-blocks-pro1,4222.5356.64217.25
Settings /wp-admin/edit.php?post_type=genesis_custom_block&page=genesis-custom-blocks-settings1,0882.3753.35111.87
All Blocks /wp-admin/edit.php?post_type=genesis_custom_block2,1943.2262.45180.91
Documentation /wp-admin/edit.php?post_type=genesis_custom_block&page=genesis-custom-blocks-documentation9602.5651.24117.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • genesis_custom_blocks_example_post_id

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 | 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
Please fix the following items
  • 31× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Genesis\\CustomBlocks\\ComponentInterface' not found in wp-content/plugins/genesis-custom-blocks/php/ComponentAbstract.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\ComponentAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Admin/Admin.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\Blocks\\Controls\\ControlAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Blocks/Controls/Number.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\Blocks\\Controls\\ControlAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Blocks/Controls/Url.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\Blocks\\Controls\\ControlAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Blocks/Controls/Range.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\ComponentAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Admin/Documentation.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\Blocks\\Controls\\ControlAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Blocks/Controls/Select.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\Blocks\\Controls\\ControlAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Blocks/Controls/Image.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\PluginAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Plugin.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\CustomBlocks\\Blocks\\Controls\\ControlAbstract' not found in wp-content/plugins/genesis-custom-blocks/php/Blocks/Controls/Checkbox.php:15

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: The official readme.txt might help

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

"Genesis Custom Blocks" version 1.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/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
There were no executable files found in this plugin4,601 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP537212,4303,146
CSS63322071,407
SVG20026
JavaScript301021
JSON1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.21
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces2
Traits0
Classes36
▷ Abstract classes38.33%
▷ Concrete classes3391.67%
▷ Final classes00.00%
Methods208
▷ Static methods31.44%
▷ Public methods19895.19%
▷ Protected methods73.37%
▷ Private methods31.44%
Functions26
▷ Named functions2076.92%
▷ Anonymous functions623.08%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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