Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.02MB] [CPU: ▼8.24ms] Passed 4 tests
Server-side resources used by User Block Visibility
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 37.05 ▼3.49 |
Dashboard /wp-admin | 3.32 ▲0.02 | 47.13 ▼3.41 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 48.92 ▼0.39 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 85.94 ▼19.53 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 31.13 ▼6.51 |
Server storage [IO: ▲0.28MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
User Block Visibility: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.25 ▼0.30 | 1.69 ▼0.00 | 43.82 ▲3.38 |
Dashboard /wp-admin | 2,195 ▲18 | 5.63 ▲0.01 | 89.64 ▼1.55 | 38.32 ▼4.61 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.97 ▲0.02 | 38.25 ▲1.30 | 36.94 ▲1.44 |
Add New Post /wp-admin/post-new.php | 1,533 ▲4 | 23.12 ▼0.13 | 682.13 ▼0.12 | 53.94 ▼2.08 |
Media Library /wp-admin/upload.php | 1,403 ▲6 | 4.19 ▲0.06 | 104.52 ▼15.61 | 47.30 ▼2.56 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 5× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/user-block-visibility/user-block-visibility.php:13
- > PHP Fatal error
require_once(): Failed opening required 'UBV_UTILITIES' (include_path='.:/usr/share/php') in wp-content/plugins/user-block-visibility/lib/scripts.php on line 3
- > PHP Warning
Use of undefined constant UBV_UTILITIES - assumed 'UBV_UTILITIES' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-block-visibility/lib/scripts.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/user-block-visibility/lib/hide.php:40
- > PHP Warning
require_once(UBV_UTILITIES): failed to open stream: No such file or directory in wp-content/plugins/user-block-visibility/lib/scripts.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
3 plugin tags: blocks, gutenberg, users
user-block-visibility/user-block-visibility.php Passed 13 tests
"User Block Visibility" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
58 characters long description:
Allows authors to restrict access to blocks by user roles.
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
Good job! No executable or dangerous file extensions detected7,974 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 7,757 |
JavaScript | 3 | 27 | 9 | 120 |
PHP | 4 | 39 | 51 | 85 |
Sass | 1 | 2 | 0 | 11 |
CSS | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 2.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 2.00 |
Average method complexity | 1.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 2.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 2 | |
▷ Static methods | 1 | 50.00% |
▷ Public methods | 2 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin