84% bp2wp-full-sync

Code Review | BuddyPress to WordPress Full Sync

WordPress plugin BuddyPress to WordPress Full Sync scored84%from 54 tests.

About plugin

  • Plugin page: bp2wp-full-sync
  • Plugin version: 0.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Jan 29, 2017
  • Latest release: Jun 16, 2021
  • Number of updates: 32
  • Update frequency: every 49.9 days
  • Top authors: SGr33n (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

400+ active /14,583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.78ms] Passed 4 tests

Analyzing server-side resources used by BuddyPress to WordPress Full Sync
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.31 ▼4.68
Dashboard /wp-admin3.35 ▲0.0445.61 ▼6.99
Posts /wp-admin/edit.php3.40 ▲0.0448.91 ▼0.75
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.29 ▼2.69
Media Library /wp-admin/upload.php3.27 ▲0.0435.93 ▲2.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for BuddyPress to WordPress Full Sync
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.66 ▼0.721.90 ▼0.0844.83 ▲0.24
Dashboard /wp-admin2,206 ▲184.86 ▼1.15108.08 ▼11.5242.99 ▼4.75
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0340.11 ▲1.7236.24 ▼2.02
Add New Post /wp-admin/post-new.php1,533 ▲1323.23 ▼0.05628.10 ▼41.1761.49 ▲12.80
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0394.63 ▼6.9940.46 ▼5.03

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • 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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bp2wp-full-sync/bp2wp-full-sync.php:15

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (This is the BuddyPress Profile Field edit page, BuddyPress to WordPress Full Sync adds the Sync to WordPress user field menu, that allows to select a WordPress user field.) image not found
The official readme.txt is a good inspiration

bp2wp-full-sync/bp2wp-full-sync.php Passed 13 tests

"BuddyPress to WordPress Full Sync" version 0.3.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
134 characters long description:
BuddyPress to WordPress Full Sync lets BuddyPress users to synchronize various users fields with WordPress user fields and vice versa.

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
No dangerous file extensions were detected172 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP253138172

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png64.52KB23.91KB▼ 62.95%