83% advanced-xprofile-fields-for-buddypress

Code Review | Advanced XProfile Fields for BuddyPress

WordPress plugin Advanced XProfile Fields for BuddyPress scored83%from 54 tests.

About plugin

  • Plugin page: advanced-xprofile...
  • Plugin version: 1.0.4.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.4
  • WordPress version: 6.3.1
  • First release: Aug 24, 2015
  • Latest release: Apr 26, 2020
  • Number of updates: 12
  • Update frequency: every 142.3 days
  • Top authors: suiteplugins (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /11,553 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.32ms] Passed 4 tests

Analyzing server-side resources used by Advanced XProfile Fields for BuddyPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.39 ▼6.93
Dashboard /wp-admin3.36 ▲0.0249.49 ▼16.79
Posts /wp-admin/edit.php3.41 ▲0.0651.31 ▲0.58
Add New Post /wp-admin/post-new.php5.94 ▲0.0693.41 ▼2.05
Media Library /wp-admin/upload.php3.28 ▲0.0537.17 ▼3.50

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Advanced XProfile Fields for BuddyPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.58 ▼0.391.70 ▼0.0841.33 ▼2.50
Dashboard /wp-admin2,206 ▲145.89 ▲0.95103.17 ▼6.6939.49 ▼3.32
Posts /wp-admin/edit.php2,092 ▲62.06 ▲0.0637.53 ▼1.0936.33 ▲0.43
Add New Post /wp-admin/post-new.php1,533 ▲1923.10 ▼0.31656.20 ▼23.3054.95 ▲6.22
Media Library /wp-admin/upload.php1,388 ▼04.26 ▲0.1299.83 ▼22.9446.70 ▼2.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/advanced-xprofile-fields-for-buddypress/admin/template/tab-validation.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/advanced-xprofile-fields-for-buddypress/admin/template/tab-advanced.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-xprofile-fields-for-buddypress/admin/template/tab-labels.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/advanced-xprofile-fields-for-buddypress/admin/template/metabox.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: social network, buddypress, suiteplugins, buddypress xprofile fields, buddypress groups...

advanced-xprofile-fields-for-buddypress/sp-advanced-xprofile.php 77% from 13 tests

The entry point to "Advanced XProfile Fields for BuddyPress" version 1.0.4.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-xprofile-fields-for-buddypress.php" instead of "sp-advanced-xprofile.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin598 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP52167514
PO File1343484

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity6.18
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin