10% dynamic-blocks

Code Review | Dynamic Blocks - testimonial gutenberg block, client logo gutenberg block

WordPress plugin Dynamic Blocks - testimonial gutenberg block, client logo gutenberg block scored10%from 54 tests.

About plugin

  • Plugin page: dynamic-blocks
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2022
  • Latest release: Oct 3, 2023
  • Number of updates: 13
  • Update frequency: every 22.6 days
  • Top authors: gutenberglabcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /178 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Error in wp-content/plugins/dynamic-blocks/src/render/client-logo.php+5
    Cannot redeclare register_latest_post_clientlogo() (previously declared in wp-content/plugins/dynamic-blocks/src/render/client-logo.php:5)

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.58ms] Passed 4 tests

A check of server-side resources used by Dynamic Blocks - testimonial gutenberg block, client logo gutenberg block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.46 ▼6.88
Dashboard /wp-admin3.31 ▲0.0044.00 ▼6.20
Posts /wp-admin/edit.php3.36 ▲0.0046.47 ▲0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.49 ▼10.19
Media Library /wp-admin/upload.php3.23 ▲0.0037.38 ▲3.20

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

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

Browser metrics Passed 4 tests

Dynamic Blocks - testimonial gutenberg block, client logo gutenberg block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.131.60 ▼0.2942.52 ▼6.00
Dashboard /wp-admin2,206 ▲155.79 ▲0.9197.27 ▼19.6339.76 ▼7.80
Posts /wp-admin/edit.php2,071 ▼182.00 ▼0.0434.08 ▼4.5333.90 ▲0.72
Add New Post /wp-admin/post-new.php1,528 ▼523.49 ▲0.13665.63 ▼11.1667.69 ▲13.96
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.03105.47 ▲1.5143.91 ▼4.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-blocks/src/fields/testimonial.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-blocks/src/render/client-logo.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-blocks/src/render/testimonial.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-blocks/src/fields/clientlogo-field.php:17

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("gutenberglab.com")
You can look at the official readme.txt

dynamic-blocks/plugin.php 85% from 13 tests

The primary PHP file in "Dynamic Blocks - testimonial gutenberg block, client logo gutenberg block" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dynamic-blocks.php" instead of "plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin46,240 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS198,01113833,912
JavaScript83,4641,57111,733
PHP6144131491
Markdown123052
Sass34133
SVG10019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin