84% bp-xprofile-custom-fields

Code Review | Buddypress XProfile Custom Field Types Reloaded

WordPress plugin Buddypress XProfile Custom Field Types Reloaded scored84%from 54 tests.

About plugin

  • Plugin page: bp-xprofile-custo...
  • Plugin version: 2.6.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Mar 18, 2019
  • Number of updates: 10
  • Update frequency: every 28.7 days
  • Top authors: seventhqueen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Buddypress XProfile Custom Field Types Reloaded
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.71 ▲2.81
Dashboard /wp-admin3.35 ▲0.0152.04 ▼9.01
Posts /wp-admin/edit.php3.47 ▲0.1155.17 ▲11.92
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.54 ▼13.27
Media Library /wp-admin/upload.php3.28 ▲0.0544.15 ▲10.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
bxcft_notices
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Buddypress XProfile Custom Field Types Reloaded
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.21 ▼1.601.69 ▲0.0742.07 ▼1.20
Dashboard /wp-admin2,218 ▲334.91 ▼0.90103.06 ▲1.5637.43 ▼7.75
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0238.41 ▲3.3035.42 ▲0.08
Add New Post /wp-admin/post-new.php1,555 ▲2718.11 ▲0.04620.78 ▲11.2549.72 ▼14.11
Media Library /wp-admin/upload.php1,406 ▲184.32 ▲0.0799.78 ▼1.8943.10 ▲0.55

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_DecimalNumber.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_MultiSelectCustomPostType.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_SelectCustomPostType.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_Web.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_Datepicker.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_MultiSelectCustomTaxonomy.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_Email.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_Image.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_Birthdate.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Field_Type' not found in wp-content/plugins/bp-xprofile-custom-fields/classes/Bxcft_Field_Type_CheckboxAcceptance.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
4 plugin tags: profile fields, buddypress, custom fields, xprofile

bp-xprofile-custom-fields/bp-xprofile-custom-fields-type.php 92% from 13 tests

The principal PHP file in "Buddypress XProfile Custom Field Types Reloaded" v. 2.6.5 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bp-xprofile-custom-fields.php" instead of "bp-xprofile-custom-fields-type.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin5,352 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP164495002,970
PO File96741,2711,355
JavaScript7168611,026
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity34.69
▷ Minimum class complexity5.00
▷ Maximum class complexity196.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods122
▷ Static methods1814.75%
▷ Public methods11997.54%
▷ Protected methods00.00%
▷ Private methods32.46%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/jscolor/hs.png2.62KB7.54KB0.00%
js/jscolor/hv.png2.80KB7.32KB0.00%