84% reusable-gutenberg-blocks-widget

Code Review | Reusable Gutenberg Blocks Widget

WordPress plugin Reusable Gutenberg Blocks Widget scored84%from 54 tests.

About plugin

  • Plugin page: reusable-gutenber...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Feb 20, 2018
  • Latest release: Feb 20, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: phpbits (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

900+ active /16,700 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Reusable Gutenberg Blocks Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.18 ▼5.41
Dashboard /wp-admin3.32 ▼0.0358.24 ▼3.37
Posts /wp-admin/edit.php3.37 ▲0.0147.92 ▲3.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.90 ▼6.63
Media Library /wp-admin/upload.php3.24 ▲0.0139.81 ▲1.47

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_gutenrbw_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Reusable Gutenberg Blocks Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.74 ▲0.541.87 ▲0.1542.35 ▲1.31
Dashboard /wp-admin2,192 ▲115.59 ▼0.1394.16 ▼16.2341.31 ▼1.17
Posts /wp-admin/edit.php2,103 ▲32.04 ▲0.0541.68 ▲5.5434.11 ▲0.83
Add New Post /wp-admin/post-new.php1,526 ▼723.91 ▲0.72690.04 ▲1.5164.24 ▼1.26
Media Library /wp-admin/upload.php1,403 ▲64.22 ▼0.0097.76 ▼27.8445.85 ▼6.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_gutenrbw_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reusable-gutenberg-blocks-widget/includes/widget.php:6

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Using Reusable Block Widget)
Please take inspiration from this readme.txt

reusable-gutenberg-blocks-widget/plugin.php 92% from 13 tests

"Reusable Gutenberg Blocks Widget" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("reusable-gutenberg-blocks-widget.php" instead of "plugin.php")

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
Good job! No executable or dangerous file extensions detected116 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP427103116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity10.00
▷ Minimum class complexity8.00
▷ Maximum class complexity12.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods7
▷ Static methods114.29%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin