84% wicked-block-conditions

Code Review | Wicked Block Conditions

WordPress plugin Wicked Block Conditions scored84%from 54 tests.

About plugin

  • Plugin page: wicked-block-cond...
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 3, 2019
  • Latest release: Aug 22, 2023
  • Number of updates: 23
  • Update frequency: every 65.7 days
  • Top authors: wickedplugins (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /4,931 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.60ms] Passed 4 tests

An overview of server-side resources used by Wicked Block Conditions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.40 ▼5.45
Dashboard /wp-admin3.32 ▲0.0245.08 ▼0.72
Posts /wp-admin/edit.php3.37 ▲0.0148.39 ▲0.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.31 ▼4.74
Media Library /wp-admin/upload.php3.24 ▲0.0140.63 ▲7.08

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Wicked Block Conditions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.18 ▼1.575.30 ▲3.4239.49 ▲0.61
Dashboard /wp-admin2,209 ▲184.87 ▼0.03101.73 ▼5.0340.04 ▼5.66
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0138.36 ▼1.6437.63 ▼0.29
Add New Post /wp-admin/post-new.php1,676 ▲16222.01 ▲4.54587.58 ▼62.0057.77 ▲4.79
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.0597.18 ▼2.6643.20 ▲0.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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
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
Almost there! Just fix the following items
  • 22× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wicked-block-conditions/classes/condition/class-query-string.php
    • > /wp-content/plugins/wicked-block-conditions/classes/token/class-token-collection.php
    • > /wp-content/plugins/wicked-block-conditions/classes/util/class-json-mapper.php
    • > /wp-content/plugins/wicked-block-conditions/classes/token/class-token.php
    • > /wp-content/plugins/wicked-block-conditions/classes/condition/class-condition.php
    • > /wp-content/plugins/wicked-block-conditions/classes/condition/class-current-date.php
    • > /wp-content/plugins/wicked-block-conditions/classes/rest-api/v1/class-rest-api.php
    • > /wp-content/plugins/wicked-block-conditions/classes/condition/class-post-slug.php
    • > /wp-content/plugins/wicked-block-conditions/classes/condition/class-user-is-logged-in.php
    • > /wp-content/plugins/wicked-block-conditions/classes/util/class-util.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: conditional blocks, conditions, administration, blocks, gutenberg...

wicked-block-conditions/wicked-block-conditions.php Passed 13 tests

The primary PHP file in "Wicked Block Conditions" version 1.2.2 is used by WordPress to initiate all plugin functionality
40 characters long description:
Show or hide blocks based on conditions.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,265 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2619921,134
PHP22418791994
CSS1276112
JSON10025

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes21
▷ Abstract classes29.52%
▷ Concrete classes1990.48%
▷ Final classes210.53%
Methods97
▷ Static methods1616.49%
▷ Public methods7779.38%
▷ Protected methods1515.46%
▷ Private methods55.15%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin