Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▼4.86ms] Passed 4 tests
A check of server-side resources used by If Block — Visibility control for Blocks
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.09 | 43.25 ▼1.59 |
Dashboard /wp-admin | 3.39 ▲0.09 | 50.83 ▲0.55 |
Posts /wp-admin/edit.php | 3.50 ▲0.15 | 48.87 ▼8.70 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.10 | 90.69 ▼7.30 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 34.47 ▼1.84 |
Server storage [IO: ▲0.20MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for If Block — Visibility control for Blocks
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.21 ▼0.34 | 1.80 ▲0.19 | 44.48 ▲2.82 |
Dashboard /wp-admin | 2,192 ▲12 | 5.62 ▼0.04 | 92.51 ▼0.32 | 43.83 ▼1.94 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 2.02 ▲0.02 | 38.57 ▼1.23 | 37.86 ▼2.97 |
Add New Post /wp-admin/post-new.php | 6,192 ▲4,664 | 19.25 ▼3.89 | 883.24 ▲266.31 | 54.45 ▼1.78 |
Media Library /wp-admin/upload.php | 1,400 ▲6 | 4.22 ▲0.10 | 96.11 ▼6.67 | 39.63 ▼12.18 |
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
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function IfBlock\\Includes\\wp_die() in wp-content/plugins/if-block-visibility-control-for-blocks/includes/class-block.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function IfBlock\\wp_die() in wp-content/plugins/if-block-visibility-control-for-blocks/class-ifblock.php:38
- > PHP Fatal error
Uncaught Error: Call to undefined function IfBlock\\Includes\\wp_die() in wp-content/plugins/if-block-visibility-control-for-blocks/includes/class-api.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 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: if block, block logic, user role, conditional logic, conditional display...
if-block-visibility-control-for-blocks/class-ifblock.php 77% from 13 tests
"If Block — Visibility control for Blocks" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Description: Please keep the plugin description shorter than 140 characters (currently 152 characters long)
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("if-block-visibility-control-for-blocks.php" instead of "class-ifblock.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
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
No dangerous file extensions were detected338 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 71 | 259 | 334 |
CSS | 2 | 0 | 0 | 2 |
JavaScript | 1 | 0 | 4 | 2 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 11.33 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 24.00 |
Average method complexity | 2.32 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 3 | 100.00% |
Methods | 23 | |
▷ Static methods | 7 | 30.43% |
▷ Public methods | 19 | 82.61% |
▷ Protected methods | 1 | 4.35% |
▷ Private methods | 3 | 13.04% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
There are no PNG files in this plugin