84% bp-social-connect

Code Review | BP Social Connect

WordPress plugin BP Social Connect scored84%from 54 tests.

About plugin

  • Plugin page: bp-social-connect
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.2.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2015
  • Latest release: May 18, 2023
  • Number of updates: 22
  • Update frequency: every 131.7 days
  • Top authors: wpthemes (95.45%)VibeThemes (9.09%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /92,521 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.16MB] [CPU: ▼5.39ms] Passed 4 tests

An overview of server-side resources used by BP Social Connect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1528.77 ▼14.09
Dashboard /wp-admin3.47 ▲0.1746.27 ▼2.33
Posts /wp-admin/edit.php3.58 ▲0.2347.34 ▲2.36
Add New Post /wp-admin/post-new.php6.05 ▲0.1787.50 ▼7.36
Media Library /wp-admin/upload.php3.39 ▲0.1735.95 ▲2.24
BP Social Connect /wp-admin/options-general.php?page=bp-social-connect3.3631.40

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BP Social Connect
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.26 ▼1.321.70 ▼0.2036.04 ▼10.70
Dashboard /wp-admin2,210 ▲225.83 ▲0.9496.63 ▼19.4542.23 ▼5.05
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0339.53 ▲3.9535.25 ▲1.88
Add New Post /wp-admin/post-new.php1,536 ▲1723.23 ▲0.09643.91 ▼30.2858.31 ▲5.29
Media Library /wp-admin/upload.php1,392 ▲44.16 ▼0.0296.08 ▼11.0142.28 ▼4.40
BP Social Connect /wp-admin/options-general.php?page=bp-social-connect8122.0425.0128.67

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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 fix the following items
  • 61× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'apiIO' not found in wp-content/plugins/bp-social-connect/includes/social/google/src/io/apiCurlIO.php:25
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/bp-social-connect/includes/social/google/src/contrib/apiModeratorService.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/bp-social-connect/includes/social/google/src/contrib/apiFreebaseService.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/bp-social-connect/includes/social/google/src/contrib/apiCustomsearchService.php on line 18
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/bp-social-connect/includes/social/google/src/contrib/apiOauth2Service.php on line 18
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/bp-social-connect/includes/social/google/src/contrib/apiPredictionService.php on line 18
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/bp-social-connect/includes/social/google/src/contrib/apiSiteVerificationService.php on line 18
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/bp-social-connect/includes/social/google/src/contrib/apiFreebaseService.php on line 18
    • > PHP Warning
      require_once(external/OAuth.php): failed to open stream: No such file or directory in wp-content/plugins/bp-social-connect/includes/social/google/src/auth/apiOAuth.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/bp-social-connect/includes/social/google/src/contrib/apiPagespeedonlineService.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: social, social login, community, social networking, buddypress...

bp-social-connect/bp_social_connect.php 92% from 13 tests

This is the main PHP file of "BP Social Connect" version 1.6.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bp-social-connect.php" instead of "bp_social_connect.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin18,331 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP561,2814,91418,306
JavaScript14013
CSS12012

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.09
Average class complexity2.44
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes478
▷ Abstract classes51.05%
▷ Concrete classes47398.95%
▷ Final classes00.00%
Methods3,720
▷ Static methods220.59%
▷ Public methods3,67898.87%
▷ Protected methods90.24%
▷ Private methods330.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/fb_logo.png0.57KB0.32KB▼ 43.88%