90% civicrm-wp-member-sync

Code Review | CiviCRM Member Sync

WordPress plugin CiviCRM Member Sync scored90%from 54 tests.

About plugin

  • Plugin page: civicrm-wp-member...
  • Plugin version: 0.6.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Jan 19, 2015
  • Latest release: May 19, 2023
  • Number of updates: 69
  • Update frequency: every 44.1 days
  • Top authors: needle (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /20,262 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.25ms] Passed 4 tests

Analyzing server-side resources used by CiviCRM Member Sync
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.92 ▼4.15
Dashboard /wp-admin3.33 ▲0.0251.13 ▼0.84
Posts /wp-admin/edit.php3.38 ▲0.0249.13 ▲0.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.49 ▼8.57
Media Library /wp-admin/upload.php3.25 ▲0.0240.03 ▲7.27

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
civi_wp_member_sync_settings
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
civi_wp_member_sync_version
theysaidso_admin_options

Browser metrics Passed 4 tests

CiviCRM Member Sync: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▼0.011.67 ▼0.2539.39 ▼5.13
Dashboard /wp-admin2,206 ▲174.85 ▼0.08111.69 ▼3.1441.11 ▼6.83
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0639.87 ▲4.4935.04 ▲0.83
Add New Post /wp-admin/post-new.php1,533 ▲1923.36 ▲5.88674.06 ▼2.9064.71 ▲11.88
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0096.96 ▲1.4943.26 ▲2.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: membership, civicrm, member, sync

civicrm-wp-member-sync/civicrm-wp-member-sync.php Passed 13 tests

The primary PHP file in "CiviCRM Member Sync" version 0.6.0 is used by WordPress to initiate all plugin functionality
74 characters long description:
Synchronize CiviCRM Memberships with WordPress User Roles or Capabilities.

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
Success! There were no dangerous files found in this plugin5,791 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP292,2244,0194,382
CSS25895956
JavaScript4293476453

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity62.56
▷ Minimum class complexity1.00
▷ Maximum class complexity213.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods198
▷ Static methods00.00%
▷ Public methods19497.98%
▷ Protected methods00.00%
▷ Private methods42.02%
Functions11
▷ Named functions327.27%
▷ Anonymous functions872.73%
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_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
assets/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
assets/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
assets/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%