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
Installer ran successfully
Server metrics [RAM: ▲0.29MB] [CPU: ▼1.71ms] Passed 4 tests
This is a short check of server-side resources used by Restricted Blocks
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.13 | 42.56 ▲1.35 |
Dashboard /wp-admin | 3.70 ▲0.39 | 56.82 ▲1.57 |
Posts /wp-admin/edit.php | 3.75 ▲0.39 | 51.61 ▲0.57 |
Add New Post /wp-admin/post-new.php | 6.22 ▲0.33 | 103.20 ▼9.21 |
Media Library /wp-admin/upload.php | 3.56 ▲0.33 | 38.60 ▲0.46 |
Help /wp-admin/admin.php?page=daextrebl-help | 3.52 | 38.22 |
Restrictions /wp-admin/admin.php?page=daextrebl-restrictions | 3.94 | 45.26 |
Pro Version /wp-admin/admin.php?page=daextrebl-pro-version | 3.53 | 34.17 |
Options /wp-admin/admin.php?page=daextrebl-options | 3.53 | 36.92 |
Server storage [IO: ▲1.09MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 125 new files
Database: 1 new table, 25 new options
New tables |
---|
wp_daextrebl_restriction |
New WordPress options |
---|
daextrebl_controls_background_color |
daextrebl_google_font_url |
daextrebl_font_family |
widget_recent-posts |
daextrebl_title_font_color |
daextrebl_controls_label_color |
daextrebl_buttons_font_color |
theysaidso_admin_options |
widget_recent-comments |
daextrebl_restrictions_menu_capability |
... |
Browser metrics Passed 4 tests
Checking browser requirements for Restricted Blocks
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,941 ▲180 | 13.52 ▼0.86 | 9.12 ▲7.47 | 39.92 ▼6.51 |
Dashboard /wp-admin | 2,230 ▲53 | 5.63 ▼0.05 | 91.36 ▲2.32 | 39.47 ▼6.32 |
Posts /wp-admin/edit.php | 2,135 ▲35 | 1.97 ▲0.01 | 39.16 ▲3.04 | 36.74 ▲0.26 |
Add New Post /wp-admin/post-new.php | 1,561 ▲35 | 23.69 ▲0.13 | 635.02 ▼60.98 | 64.03 ▲8.89 |
Media Library /wp-admin/upload.php | 1,429 ▲29 | 4.16 ▼0.05 | 99.49 ▼4.29 | 45.94 ▲0.91 |
Help /wp-admin/admin.php?page=daextrebl-help | 844 | 2.00 | 23.13 | 28.48 |
Restrictions /wp-admin/admin.php?page=daextrebl-restrictions | 3,388 | 5.53 | 106.95 | 68.87 |
Pro Version /wp-admin/admin.php?page=daextrebl-pro-version | 851 | 2.00 | 25.31 | 28.42 |
Options /wp-admin/admin.php?page=daextrebl-options | 2,294 | 3.40 | 91.33 | 33.20 |
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
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
Please fix the following items
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/restricted-blocks/admin/view/options.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/restricted-blocks/admin/view/restrictions.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/restricted-blocks/admin/view/pro_version.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/restricted-blocks/admin/view/help.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
- Tags: There are too many tags (12 tag instead of maximum 10)
restricted-blocks/init.php 92% from 13 tests
The primary PHP file in "Restricted Blocks" version 1.11 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("restricted-blocks.php" instead of "init.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin17,972 lines of code in 108 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 74 | 2,827 | 880 | 11,388 |
CSS | 14 | 621 | 87 | 3,230 |
PHP | 15 | 1,020 | 1,386 | 3,054 |
Markdown | 2 | 116 | 0 | 249 |
JSON | 1 | 0 | 0 | 31 |
SVG | 2 | 0 | 0 | 20 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 37.14 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 136.00 |
Average method complexity | 2.95 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 78.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 130 | |
▷ Static methods | 16 | 12.31% |
▷ Public methods | 119 | 91.54% |
▷ Protected methods | 2 | 1.54% |
▷ Private methods | 9 | 6.92% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 9 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 9 | 100.00% |
▷ Public constants | 9 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/assets/img/edit-hover.png | 1.30KB | 0.33KB | ▼ 74.47% |
admin/assets/img/help-f7f7f7.png | 15.86KB | 0.59KB | ▼ 96.25% |
admin/assets/img/clone.png | 18.71KB | 0.12KB | ▼ 99.34% |
admin/assets/img/search-hover.png | 0.21KB | 0.21KB | 0.00% |
admin/assets/img/search.png | 0.21KB | 0.21KB | 0.00% |