72% radius-blocks

Code Review | Radius Blocks - WordPress Gutenberg Blocks

WordPress plugin Radius Blocks - WordPress Gutenberg Blocks scored 72% from 54 tests.

About plugin

  • Plugin page: radius-blocks
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2022
  • Latest release: Sep 26, 2023
  • Number of updates: 24
  • Update frequency: every 21.6 days
  • Top authors: techlabpro1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,604 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.25MB] [CPU: ▲6.18ms] 75% from 4 tests

Server-side resources used by Radius Blocks - WordPress Gutenberg Blocks
The following require your attention
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.25MB on /wp-admin/edit.php?post_type=rtrb_builder)
PageMemory (MB)CPU Time (ms)
Home /8.85 ▲5.3947.20 ▲5.21
Dashboard /wp-admin8.53 ▲5.2255.55 ▲7.72
Posts /wp-admin/edit.php8.58 ▲5.2252.69 ▲5.92
Add New Post /wp-admin/post-new.php14.20 ▲8.32108.09 ▲21.02
Media Library /wp-admin/upload.php8.39 ▲5.1739.98 ▲5.86
Settings /wp-admin/admin.php?page=rtrb8.4040.05
Header & Footer /wp-admin/edit.php?post_type=rtrb_builder8.5646.93

Server storage [IO: ▲14.92MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 431 new files
Database: no new tables, 9 new options
New WordPress options
category_children
theysaidso_admin_options
rtrb_all_blocks
can_compress_scripts
rtrb_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Radius Blocks - WordPress Gutenberg Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲14613.70 ▼0.702.16 ▲0.3242.49 ▼7.72
Dashboard /wp-admin2,233 ▲455.84 ▲0.9694.68 ▼13.5774.56 ▲27.50
Posts /wp-admin/edit.php2,128 ▲392.05 ▲0.0534.73 ▼4.9733.64 ▼0.93
Add New Post /wp-admin/post-new.php1,693 ▲17932.29 ▲14.741,062.74 ▲384.8738.11 ▼24.73
Media Library /wp-admin/upload.php1,430 ▲424.28 ▼0.03115.16 ▲10.3446.09 ▼1.14
Settings /wp-admin/admin.php?page=rtrb1,7307.74191.3479.10
Header & Footer /wp-admin/edit.php?post_type=rtrb_builder1,4302.7241.4930.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • rtrb_all_blocks
    • theysaidso_admin_options
    • category_children
    • rtrb_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/radius-blocks/radius-blocks.php
    • > /wp-content/plugins/radius-blocks/app/Helpers/Install.php
    • > /wp-content/plugins/radius-blocks/templates/blocks/contact-form7/layout-1.php
    • > /wp-content/plugins/radius-blocks/templates/blocks/slider-header-footer/footer.php
    • > /wp-content/plugins/radius-blocks/app/Rtrb.php
    • > /wp-content/plugins/radius-blocks/templates/blocks/post-timeline/footer.php
    • > /wp-content/plugins/radius-blocks/templates/blocks/fluent-form/layout-1.php
  • 300× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/radius-blocks/templates/blocks/post-grid/grid/layout-1.php on line 36
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/radius-blocks/templates/blocks/post-timeline/header.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/radius-blocks/templates/blocks/pricing-table/layout-2.php on line 28
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/radius-blocks/templates/blocks/slider-header-footer/footer.php on line 19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/radius-blocks/templates/blocks/slider-header-footer/footer.php on line 19
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/radius-blocks/templates/blocks/post-timeline/layout-4.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/radius-blocks/templates/blocks/slider-header-footer/footer.php on line 19
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/radius-blocks/templates/blocks/infobox/layout-4.php on line 32
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/radius-blocks/templates/blocks/pricing-table/layout-1.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/radius-blocks/templates/blocks/advanced-image/layout.php:39

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=rtrb_builder
    • > Deprecation (warning) in unknown
    /wp-content/plugins/radius-blocks/assets/js/rtrb-animation-load.js?ver=2.1.0 15 Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

radius-blocks/radius-blocks.php 92% from 13 tests

The main file in "Radius Blocks - WordPress Gutenberg Blocks" v. 2.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin136,559 lines of code in 361 files:
LanguageFilesBlank linesComment linesLines of code
JSON492058,338
PHP1685,3921,42255,656
SVG1185811717,353
CSS10712184,237
JavaScript16145154975

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity10.59
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces12
Interfaces0
Traits1
Classes81
▷ Abstract classes11.23%
▷ Concrete classes8098.77%
▷ Final classes11.25%
Methods450
▷ Static methods7216.00%
▷ Public methods43997.56%
▷ Protected methods30.67%
▷ Private methods81.78%
Functions9
▷ Named functions111.11%
▷ Anonymous functions888.89%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.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
55 PNG files occupy 1.67MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/blocks/image-accordion/2.png1.48KB0.94KB▼ 36.38%
assets/img/blocks/navigation/preview.png4.06KB1.77KB▼ 56.44%
assets/img/icons/blue.png0.37KB0.26KB▼ 30.16%
assets/img/blocks/form/fluent-form-preview.png8.63KB3.86KB▼ 55.29%
assets/img/blocks/dropcaps/5.png1.25KB0.62KB▼ 50.47%