84% sidebar-widget-blocks

Code Review | Sidebar Widget Blocks

WordPress plugin Sidebar Widget Blocks scored84%from 54 tests.

About plugin

  • Plugin page: sidebar-widget-bl...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Jan 24, 2019
  • Latest release: Jan 24, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: presscargo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼10.81ms] Passed 4 tests

A check of server-side resources used by Sidebar Widget Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.72 ▼6.51
Dashboard /wp-admin3.38 ▲0.0348.88 ▼13.73
Posts /wp-admin/edit.php3.49 ▲0.1348.75 ▼2.75
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.57 ▼20.24
Media Library /wp-admin/upload.php3.30 ▲0.0739.37 ▲6.29
All Sidebars /wp-admin/edit.php?post_type=gs_sidebar3.3440.83
Add New /wp-admin/post-new.php?post_type=gs_sidebar6.0184.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_sidebar_widget_blocks
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Sidebar Widget Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.35 ▼0.032.22 ▼0.0546.22 ▲0.16
Dashboard /wp-admin2,219 ▲425.50 ▼0.0985.76 ▼5.8439.51 ▼0.46
Posts /wp-admin/edit.php2,130 ▲271.97 ▼0.0141.47 ▼1.8335.82 ▲0.13
Add New Post /wp-admin/post-new.php1,549 ▲2323.07 ▼0.06697.59 ▼11.0655.43 ▲3.33
Media Library /wp-admin/upload.php1,430 ▲304.14 ▼0.01116.15 ▲14.1948.87 ▲5.23
All Sidebars /wp-admin/edit.php?post_type=gs_sidebar1,0971.9639.0230.53
Add New /wp-admin/post-new.php?post_type=gs_sidebar6,19422.571,031.4931.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_sidebar_widget_blocks
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sidebar-widget-blocks/inc/functions-cpt.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sidebar-widget-blocks/inc/class-widget-sidebar.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sidebar-widget-blocks/inc/functions-widgets.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: sidebar, blocks, gutenberg, widget

sidebar-widget-blocks/sidebar-widget-blocks.php Passed 13 tests

This is the main PHP file of "Sidebar Widget Blocks" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
65 characters long description:
Creates a widget for displaying Gutenberg blocks in your sidebars

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
Everything looks great! No dangerous files found in this plugin207 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP468223207

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods861.54%
▷ Protected methods00.00%
▷ Private methods538.46%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin