83% buddypress-members-only

Code Review | BuddyPress Members Only

WordPress plugin BuddyPress Members Only scored83%from 54 tests.

About plugin

  • Plugin page: buddypress-member...
  • Plugin version: 3.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2014
  • Latest release: May 5, 2023
  • Number of updates: 57
  • Update frequency: every 59.4 days
  • Top authors: zhuyi (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

1,000+ active /109,272 total downloads

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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.24MB] [CPU: ▼1.32ms] Passed 4 tests

A check of server-side resources used by BuddyPress Members Only
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2140.51 ▼4.11
Dashboard /wp-admin3.54 ▲0.2361.56 ▲9.35
Posts /wp-admin/edit.php3.63 ▲0.2854.38 ▼1.14
Add New Post /wp-admin/post-new.php6.23 ▲0.3488.93 ▼8.44
Media Library /wp-admin/upload.php3.48 ▲0.2544.51 ▲8.43
RSS Restricts /wp-admin/admin.php?page=bpmemberrssrestricts3.3936.91
BP Components /wp-admin/admin.php?page=bpmembercomponentonly3.3933.35
Knowledge Base /wp-admin/admin.php?page=membersonlyfaq3.4432.60
Restrict Post Types /wp-admin/admin.php?page=bpMembersOnlyFreePostTypesSettings3.3936.38
Buddypress Members Only /wp-admin/admin.php?page=bpmemberonly3.43397.85

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 11 new options
New WordPress options
bpmo_user_first_run_guide_bar_free
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
bpmoinitsetup
saved_open_page_url
widget_theysaidso_widget
bpmoregisterpageurl
bprestrictsbuddypresssection
...

Browser metrics Passed 4 tests

An overview of browser requirements for BuddyPress Members Only
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10914.24 ▼0.291.70 ▼0.0339.52 ▼4.12
Dashboard /wp-admin2,236 ▲595.62 ▲0.0695.76 ▲3.7541.55 ▼0.72
Posts /wp-admin/edit.php2,141 ▲442.04 ▲0.0539.61 ▲2.2536.55 ▼0.15
Add New Post /wp-admin/post-new.php1,559 ▲3323.25 ▲0.27678.99 ▲38.1453.76 ▲2.47
Media Library /wp-admin/upload.php1,441 ▲414.13 ▼0.07109.81 ▲2.8346.71 ▼6.93
RSS Restricts /wp-admin/admin.php?page=bpmemberrssrestricts9121.9925.0227.44
BP Components /wp-admin/admin.php?page=bpmembercomponentonly8962.1623.2724.74
Knowledge Base /wp-admin/admin.php?page=membersonlyfaq1,1732.1529.2631.75
Restrict Post Types /wp-admin/admin.php?page=bpMembersOnlyFreePostTypesSettings9472.1223.8928.99
Buddypress Members Only /wp-admin/admin.php?page=bpmemberonly1,3862.0427.6236.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 11 options in the database
    • bprestrictsbuddypresssection
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • bpmoregisterpageurl
    • theysaidso_admin_options
    • bpmo_user_first_run_guide_bar_free
    • bpmoinitsetup
    • saved_open_page_url
    • ...

Smoke tests 75% from 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 50% 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 fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/buddypress-members-only/admin/howto.php
    • > /wp-content/plugins/buddypress-members-only/rules/rssrestrictssetting.php
    • > /wp-content/plugins/buddypress-members-only/componentsettings.php
    • > /wp-content/plugins/buddypress-members-only/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can look at the official readme.txt

buddypress-members-only/buddypress-members-only.php 85% from 13 tests

"BuddyPress Members Only" version 3.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 491 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,703 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP112651831,635
PO File17736
JavaScript10023
CSS1009

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/old.png5.78KB1.61KB▼ 72.15%
images/buymeacoffee.png11.15KB5.58KB▼ 49.99%
images/new.png3.48KB1.90KB▼ 45.54%