73% wc4bp

Code Review | BuddyPress WooCommerce My Account Integration. Create WooCommerce Member Pages

WordPress plugin BuddyPress WooCommerce My Account Integration. Create WooCommerce Member Pages scored73%from 54 tests.

About plugin

  • Plugin page: wc4bp
  • Plugin version: 3.4.18
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2017
  • Latest release: Nov 6, 2023
  • Number of updates: 282
  • Update frequency: every 8.6 days
  • Top authors: svenl77 (82.27%)gfirem (18.09%)

Code review

54 tests

User reviews

71 reviews

Install metrics

1,000+ active /73,291 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲6.50MB] [CPU: ▲44.49ms] 50% from 4 tests

Analyzing server-side resources used by BuddyPress WooCommerce My Account Integration. Create WooCommerce Member Pages
Please take the time to fix the following items
  • RAM: Try to keep total memory usage under 10MB (currently 10.51MB on /wp-admin/admin.php?page=wc4bp-install-plugins)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 6.50MB on /wp-admin/admin.php?page=wc4bp-install-plugins)
PageMemory (MB)CPU Time (ms)
Home /10.49 ▲7.0377.68 ▲36.36
Dashboard /wp-admin10.51 ▲7.2192.91 ▲43.79
Posts /wp-admin/edit.php10.51 ▲7.1688.64 ▲41.15
Add New Post /wp-admin/post-new.php10.51 ▲4.63140.24 ▲56.64
Media Library /wp-admin/upload.php10.51 ▲7.2888.68 ▲57.58
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius10.5174.25
Install Plugins /wp-admin/admin.php?page=wc4bp-install-plugins10.5174.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 310 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
fs_accounts
widget_theysaidso_widget
fs_active_plugins
theysaidso_admin_options
db_upgraded
widget_recent-comments
fs_debug_mode
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress WooCommerce My Account Integration. Create WooCommerce Member Pages
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11614.34 ▲0.001.80 ▲0.0128.24 ▼15.55
Dashboard /wp-admin2,261 ▲865.60 ▼0.1295.46 ▼13.3147.94 ▲2.86
Posts /wp-admin/edit.php2,175 ▲752.15 ▲0.2141.81 ▲3.5344.46 ▲9.87
Add New Post /wp-admin/post-new.php1,578 ▲5223.80 ▲0.76746.53 ▲45.5152.56 ▲1.07
Media Library /wp-admin/upload.php1,468 ▲744.23 ▲0.08109.97 ▲10.7857.28 ▲13.75
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1091.8428.0230.97
Install Plugins /wp-admin/admin.php?page=wc4bp-install-plugins1,0542.1923.6432.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wc4bp/class/includes/freemius/includes/class-freemius.php+8549
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-posts
    • db_upgraded
    • fs_active_plugins
    • can_compress_scripts
    • fs_debug_mode
    • fs_accounts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wc4bp/admin/admin-gopro-screen.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: woocommerce my account, woocommerce buddypress, woocommerce member pages, buddyboss, woocommerce profile

wc4bp/wc4bp-basic-integration.php 85% from 13 tests

The principal PHP file in "BuddyPress WooCommerce My Account Integration. Create WooCommerce Member Pages" v. 3.4.18 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc4bp.php" instead of "wc4bp-basic-integration.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "3.3.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin44,764 lines of code in 238 files:
LanguageFilesBlank linesComment linesLines of code
PHP1979,76620,76141,362
PO File71,1391,1532,523
JavaScript126459440
CSS21554412
JSON10027

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity57.20
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes97
▷ Abstract classes22.06%
▷ Concrete classes9597.94%
▷ Final classes00.00%
Methods1,614
▷ Static methods25115.55%
▷ Public methods1,18173.17%
▷ Protected methods422.60%
▷ Private methods39124.23%
Functions159
▷ Named functions15396.23%
▷ Anonymous functions63.77%
Constants164
▷ Global constants11067.07%
▷ Class constants5432.93%
▷ Public constants54100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
class/includes/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
class/includes/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%