90% block-logic

Code Review | Block Logic - Full Gutenberg Block Display Control

WordPress plugin Block Logic - Full Gutenberg Block Display Control scored90%from 54 tests.

About plugin

  • Plugin page: block-logic
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 15, 2020
  • Latest release: Sep 24, 2023
  • Number of updates: 36
  • Update frequency: every 37.4 days
  • Top authors: landwire (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

300+ active /3,463 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.44ms] Passed 4 tests

An overview of server-side resources used by Block Logic - Full Gutenberg Block Display Control
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.98 ▼2.58
Dashboard /wp-admin3.32 ▲0.0248.03 ▼5.51
Posts /wp-admin/edit.php3.38 ▲0.0247.15 ▼5.83
Add New Post /wp-admin/post-new.php7.19 ▲1.3098.57 ▼3.84
Media Library /wp-admin/upload.php3.25 ▲0.0240.19 ▲7.51

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Block Logic - Full Gutenberg Block Display Control
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.25 ▼0.101.87 ▲0.0444.01 ▼3.16
Dashboard /wp-admin2,195 ▲185.50 ▼0.0885.48 ▼12.5443.62 ▼3.87
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0135.70 ▼7.4533.36 ▼6.59
Add New Post /wp-admin/post-new.php1,690 ▲16222.79 ▼0.24682.81 ▼9.4460.47 ▲8.02
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0095.55 ▼8.2443.98 ▼0.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: block, visibility, conditions, conditional logic, conditional

block-logic/block-logic.php Passed 13 tests

The principal PHP file in "Block Logic - Full Gutenberg Block Display Control" v. 1.0.8 is loaded by WordPress automatically on each request
103 characters long description:
Adds a conditional block attribute Block Logic to control block display to the "Advanced" control panel

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin108 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1284480
Markdown112023
JavaScript111764
CSS1011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin