79% organic-widget-area-block

Code Review | Organic Widget Area Block

WordPress plugin Organic Widget Area Block scored79%from 54 tests.

About plugin

  • Plugin page: organic-widget-ar...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Mar 18, 2019
  • Latest release: May 25, 2021
  • Number of updates: 14
  • Update frequency: every 57.8 days
  • Top authors: organicthemes (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /37,013 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.67MB] [CPU: ▼48.69ms] Passed 4 tests

This is a short check of server-side resources used by Organic Widget Area Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.1410.00 ▼32.19
Dashboard /wp-admin2.33 ▼0.9718.57 ▼34.16
Posts /wp-admin/edit.php2.33 ▼1.0213.99 ▼36.76
Add New Post /wp-admin/post-new.php2.33 ▼3.5512.71 ▼91.63
Media Library /wp-admin/upload.php2.33 ▼0.8910.25 ▼25.72

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Organic Widget Area Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3314.35 ▲0.061.73 ▼0.2339.82 ▼6.32
Dashboard /wp-admin2,220 ▲405.52 ▼0.0994.56 ▲8.5039.98 ▼5.32
Posts /wp-admin/edit.php2,132 ▲292.03 ▲0.0942.09 ▲1.8135.64 ▼2.15
Add New Post /wp-admin/post-new.php6,228 ▲4,70021.39 ▼1.65887.73 ▲212.4070.60 ▲23.49
Media Library /wp-admin/upload.php1,428 ▲284.28 ▲0.1099.68 ▼4.5345.78 ▲0.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method OWA_Block::register_widget_sidebar() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: traditional widgets, blocks, widget area, widgets, block editor...

organic-widget-area-block/organic-widget-area.php 77% from 13 tests

This is the main PHP file of "Organic Widget Area Block" version 1.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("organic-widget-area-block.php" instead of "organic-widget-area.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 detected481 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP379186243
JavaScript2196195
CSS20143

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 complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods743.75%
▷ Public methods1593.75%
▷ Protected methods16.25%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin