90% conditional-blocks

Code Review | Conditional Blocks - Advanced Content Visibility Control and Full Site Editing

WordPress plugin Conditional Blocks - Advanced Content Visibility Control and Full Site Editing scored90%from 54 tests.

About plugin

  • Plugin page: conditional-blocks
  • Plugin version: 3.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 29, 2019
  • Latest release: Aug 12, 2023
  • Number of updates: 48
  • Update frequency: every 30.8 days
  • Top authors: morganhvidt (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /36,812 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼8.86ms] Passed 4 tests

A check of server-side resources used by Conditional Blocks - Advanced Content Visibility Control and Full Site Editing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1240.78 ▼5.51
Dashboard /wp-admin3.42 ▲0.0751.84 ▼14.64
Posts /wp-admin/edit.php3.53 ▲0.1749.87 ▼4.34
Add New Post /wp-admin/post-new.php6.25 ▲0.3689.96 ▼10.93
Media Library /wp-admin/upload.php3.34 ▲0.1138.60 ▲2.04

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Conditional Blocks - Advanced Content Visibility Control and Full Site Editing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲814.48 ▼0.052.00 ▲0.2343.45 ▼0.56
Dashboard /wp-admin2,186 ▲125.56 ▼0.0097.18 ▲9.6239.10 ▼4.48
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0235.33 ▼5.7535.38 ▲0.27
Add New Post /wp-admin/post-new.php1,699 ▲17326.38 ▲3.14718.49 ▲14.7237.84 ▼22.82
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.10102.70 ▼2.4744.92 ▼2.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

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 issues were found

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Tags: There are too many tags (19 tag instead of maximum 10)
The official readme.txt is a good inspiration

conditional-blocks/conditional-blocks.php Passed 13 tests

The main file in "Conditional Blocks - Advanced Content Visibility Control and Full Site Editing" v. 3.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
71 characters long description:
Conditionally change the visibility of WordPress Blocks for any reason.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin784 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8184337539
CSS2211245
JavaScript1020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity15.17
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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