Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲1.83MB] [CPU: ▲10.17ms] Passed 4 tests
A check of server-side resources used by Restrictions for BuddyPress
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.08 | 39.67 ▼4.57 |
Dashboard /wp-admin | 5.73 ▲2.38 | 71.52 ▲0.48 |
Posts /wp-admin/edit.php | 5.84 ▲2.48 | 75.34 ▲25.16 |
Add New Post /wp-admin/post-new.php | 8.33 ▲2.44 | 124.48 ▲19.62 |
Media Library /wp-admin/upload.php | 5.65 ▲2.42 | 69.21 ▲31.21 |
Redux /wp-admin/options-general.php?page=redux-framework | 5.66 | 59.76 |
BuddyPress Restrict /wp-admin/options-general.php?page=bp-restrict | 5.82 | 62.73 |
Server storage [IO: ▲6.70MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 773 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
bp_restrict_opt-transients |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Restrictions for BuddyPress
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,797 ▲36 | 14.28 ▲0.01 | 1.86 ▲0.01 | 42.08 ▼2.55 |
Dashboard /wp-admin | 2,203 ▲35 | 5.59 ▼0.10 | 93.21 ▼6.94 | 41.13 ▼3.97 |
Posts /wp-admin/edit.php | 2,116 ▲19 | 2.02 ▲0.04 | 41.63 ▲4.48 | 35.50 ▼0.14 |
Add New Post /wp-admin/post-new.php | 1,537 ▲2 | 23.04 ▲4.80 | 630.27 ▼65.83 | 53.94 ▼14.03 |
Media Library /wp-admin/upload.php | 1,413 ▲19 | 4.15 ▼0.10 | 105.80 ▲7.26 | 43.38 ▼1.46 |
Redux /wp-admin/options-general.php?page=redux-framework | 1,073 | 3.65 | 84.49 | 92.92 |
BuddyPress Restrict /wp-admin/options-general.php?page=bp-restrict | 1,204 | 2.60 | 58.95 | 223.90 |
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
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 7 options
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- bp_restrict_opt-transients
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 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
Please take a closer look at the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/bp-restrict/public/views/public.php
- 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/bp-restrict/includes/options/templates/panel/menu-container.tpl.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/bp-restrict/includes/options/templates/panel/header.tpl.php:11
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/bp-restrict/includes/options/templates/panel/container.tpl.php:11
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/bp-restrict/includes/options/templates/panel/content.tpl.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/bp-restrict/includes/options/templates/panel/header-stickybar.tpl.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/bp-restrict/admin/views/admin.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: bp restrictions, buddypress, buddypress restrictions, pmpro, restrict...
bp-restrict/bp-restrict.php Passed 13 tests
"Restrictions for BuddyPress" version 1.5.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
36 characters long description:
Restrict BuddyPress pages or content
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected63,547 lines of code in 463 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 157 | 6,591 | 11,847 | 24,873 |
JavaScript | 117 | 5,245 | 2,756 | 21,356 |
Sass | 87 | 1,759 | 87 | 12,057 |
CSS | 89 | 3,423 | 274 | 3,497 |
SVG | 10 | 77 | 1 | 1,720 |
Markdown | 3 | 10 | 0 | 44 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please fix the following
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 110)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.58 |
Average class complexity | 34.87 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 338.00 |
Average method complexity | 5.63 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 110.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 148 | |
▷ Abstract classes | 4 | 2.70% |
▷ Concrete classes | 144 | 97.30% |
▷ Final classes | 0 | 0.00% |
Methods | 1,087 | |
▷ Static methods | 289 | 26.59% |
▷ Public methods | 834 | 76.72% |
▷ Protected methods | 141 | 12.97% |
▷ Private methods | 112 | 10.30% |
Functions | 18 | |
▷ Named functions | 13 | 72.22% |
▷ Anonymous functions | 5 | 27.78% |
Constants | 100 | |
▷ Global constants | 2 | 2.00% |
▷ Class constants | 98 | 98.00% |
▷ Public constants | 98 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
61 PNG files occupy 0.58MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/banner-772x250.png | 11.50KB | 5.06KB | ▼ 56.00% |
includes/options/assets/img/raw/jquery-ui-bootstrap/ui-icons_cd0a0a_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
includes/options/assets/img/jquery-ui-bootstrap/ui-icons_2e83ff_256x240.png | 4.10KB | 4.11KB | 0.00% |
includes/options/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_e6e6e6_1x400.png | 0.11KB | 0.14KB | 0.00% |
includes/options/assets/img/raw/2-col-portfolio.png | 1.02KB | 0.15KB | ▼ 85.07% |