84% bp-groups-civicrm-sync

Code Review | BP Groups CiviCRM Sync

WordPress plugin BP Groups CiviCRM Sync scored84%from 54 tests.

About plugin

  • Plugin page: bp-groups-civicrm...
  • Plugin version: 0.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2015
  • Latest release: May 15, 2023
  • Number of updates: 33
  • Update frequency: every 92.0 days
  • Top authors: needle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,428 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.73ms] Passed 4 tests

Server-side resources used by BP Groups CiviCRM Sync
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.38 ▲2.95
Dashboard /wp-admin3.33 ▲0.0349.29 ▼0.53
Posts /wp-admin/edit.php3.38 ▲0.0351.35 ▼1.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.15 ▼8.04
Media Library /wp-admin/upload.php3.26 ▲0.0336.95 ▼1.23

Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/bp-groups-civicrm-sync/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by BP Groups CiviCRM Sync
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.16 ▼1.655.27 ▲3.5342.51 ▼1.95
Dashboard /wp-admin2,218 ▲125.80 ▲0.91100.15 ▼1.5439.38 ▼3.94
Posts /wp-admin/edit.php2,103 ▲32.05 ▲0.0240.14 ▼1.1634.83 ▼4.05
Add New Post /wp-admin/post-new.php1,526 ▼017.90 ▲0.31695.04 ▼54.7853.28 ▼6.00
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.11111.05 ▼4.4147.41 ▼2.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bp-groups-civicrm-sync/assets/templates/manual-sync.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bp-groups-civicrm-sync/assets/templates/settings.php:21
    • > PHP Notice
      Undefined variable: urls in wp-content/plugins/bp-groups-civicrm-sync/assets/templates/manual-sync.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bp-groups-civicrm-sync/assets/templates/settings.php on line 21
    • > PHP Notice
      Undefined variable: urls in wp-content/plugins/bp-groups-civicrm-sync/assets/templates/settings.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bp-groups-civicrm-sync/assets/templates/manual-sync.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: civicrm, sync, user, groups, buddypress

bp-groups-civicrm-sync/bp-groups-civicrm-sync.php Passed 13 tests

The principal PHP file in "BP Groups CiviCRM Sync" v. 0.4.3 is loaded by WordPress automatically on each request
77 characters long description:
Enables two-way synchronisation between BuddyPress Groups and CiviCRM Groups.

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 detected4,526 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP141,7473,5913,462
CSS14887917
JavaScript183171115
Smarty22432

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity45.18
▷ Minimum class complexity13.00
▷ Maximum class complexity120.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods194
▷ Static methods00.00%
▷ Public methods19298.97%
▷ Protected methods00.00%
▷ Private methods21.03%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
assets/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
assets/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%