79% genesis-blocks

Code Review | Genesis Blocks

WordPress plugin Genesis Blocks scored79%from 54 tests.

About plugin

  • Plugin page: genesis-blocks
  • Plugin version: 3.1.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 25, 2020
  • Latest release: Nov 16, 2023
  • Number of updates: 35
  • Update frequency: every 33.7 days
  • Top authors: studiopress (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

90,000+ active /1,115,839 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.06MB] [CPU: ▲3.11ms] Passed 4 tests

A check of server-side resources used by Genesis Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.53 ▲1.0644.38 ▲1.10
Dashboard /wp-admin4.36 ▲1.0554.61 ▲6.96
Posts /wp-admin/edit.php4.41 ▲1.0555.61 ▲6.52
Add New Post /wp-admin/post-new.php6.99 ▲1.11101.32 ▼2.13
Media Library /wp-admin/upload.php4.28 ▲1.0542.43 ▲12.82
Migrate /wp-admin/admin.php?page=genesis-blocks-migrate4.2537.52
Settings /wp-admin/admin.php?page=genesis-blocks-settings4.3044.14
Getting Started /wp-admin/admin.php?page=genesis-blocks-getting-started4.3136.62

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 384 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
genesis_blocks_has_content_to_migrate
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Genesis Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8814.33 ▼0.401.74 ▲0.0840.05 ▼4.25
Dashboard /wp-admin2,249 ▲695.64 ▲0.0192.63 ▼8.4644.87 ▼3.49
Posts /wp-admin/edit.php2,145 ▲452.04 ▲0.0341.17 ▲5.6735.57 ▲2.15
Add New Post /wp-admin/post-new.php6,225 ▲4,69919.49 ▼3.79890.68 ▲236.9062.59 ▲8.88
Media Library /wp-admin/upload.php1,442 ▲454.18 ▲0.0099.64 ▼1.3741.89 ▼1.84
Migrate /wp-admin/admin.php?page=genesis-blocks-migrate9822.4840.4737.01
Settings /wp-admin/admin.php?page=genesis-blocks-settings1,17910.98208.74106.45
Getting Started /wp-admin/admin.php?page=genesis-blocks-getting-started1,7382.0126.0043.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • genesis_blocks_has_content_to_migrate
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/genesis-blocks/lib/Settings/views/admin/tabs/genesis-collections.php
    • > /wp-content/plugins/genesis-blocks/lib/Settings/views/admin/tabs/genesis-pro.php
    • > /wp-content/plugins/genesis-blocks/lib/Settings/views/admin/tabs/genesis-101.php
    • > /wp-content/plugins/genesis-blocks/lib/Settings/views/admin/getting-started.php
  • 47× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-blocks/src/blocks/block-newsletter/index.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-blocks/src/blocks/block-sharing/index.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/genesis-blocks/includes/patterns/gb_slate_layout_homepage_alternative.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Genesis\\Blocks\\Layouts\\add_action() in wp-content/plugins/genesis-blocks/includes/layout/register-layout-components.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Genesis\\Blocks\\Interfaces\\ModuleInterface' not found in wp-content/plugins/genesis-blocks/lib/Settings/Module.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/genesis-blocks/includes/patterns/gb_slate_section_text_with_cta.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis\\Blocks\\Exception\\API_Error_Exception' not found in wp-content/plugins/genesis-blocks/src/blocks/block-newsletter/includes/exceptions/class-mailchimp-api-error-exception.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/genesis-blocks/includes/patterns/gb_slate_section_contact_columns.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/genesis-blocks/includes/patterns/gb_slate_section_media_and_text.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/genesis-blocks/src/blocks/block-container/index.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: block enabled, gutenberg, gutenberg blocks, block, page building...

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

The primary PHP file in "Genesis Blocks" version 3.1.1 is used by WordPress to initiate all plugin functionality
93 characters long description:
A beautiful collection of handy blocks to help you get started with the new WordPress editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected33,712 lines of code in 367 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2171,5362,07017,856
PHP881,5472,6889,810
Sass3392613,675
CSS4362421,759
SVG2404607
JSON1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.72
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces17
Interfaces2
Traits1
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes1655.17%
Methods189
▷ Static methods2714.29%
▷ Public methods14978.84%
▷ Protected methods126.35%
▷ Private methods2814.81%
Functions77
▷ Named functions5166.23%
▷ Anonymous functions2633.77%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin