84% bp-profile-search

Code Review | BP Profile Search

WordPress plugin BP Profile Search scored84%from 54 tests.

About plugin

  • Plugin page: bp-profile-search
  • Plugin version: 5.4.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Jun 29, 2010
  • Latest release: Aug 13, 2023
  • Number of updates: 208
  • Update frequency: every 23.0 days
  • Top authors: dontdream (100%)

Code review

54 tests

User reviews

67 reviews

Install metrics

10,000+ active /596,264 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.01MB] [CPU: ▼6.74ms] Passed 4 tests

Server-side resources used by BP Profile Search
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0149.45 ▲9.50
Dashboard /wp-admin3.31 ▲0.0147.03 ▲1.68
Posts /wp-admin/edit.php3.36 ▲0.0146.59 ▼5.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.66 ▼24.61
Media Library /wp-admin/upload.php3.24 ▲0.0135.07 ▲1.40

Server storage [IO: ▲0.13MB] [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: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for BP Profile Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8214.36 ▼0.242.13 ▲0.4144.44 ▲7.77
Dashboard /wp-admin2,209 ▲425.55 ▲0.0281.57 ▼14.3939.26 ▲0.95
Posts /wp-admin/edit.php2,115 ▲152.03 ▲0.0034.34 ▼5.4935.55 ▼1.59
Add New Post /wp-admin/post-new.php1,535 ▲623.13 ▼0.69665.16 ▲43.6655.37 ▲0.73
Media Library /wp-admin/upload.php1,417 ▲174.18 ▼0.0195.67 ▼3.3141.90 ▼4.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bp-profile-search/bps-search.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-profile-search/bps-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-profile-search/bps-form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bps_screen() in wp-content/plugins/bp-profile-search/templates/members/bps-form-default.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-profile-search/bps-request.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bp-profile-search/bps-main.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bp-profile-search/bps-directory.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-profile-search/bps-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bp-profile-search/bps-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bps_escaped_details_data() in wp-content/plugins/bp-profile-search/templates/members/bps-details.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: search, directory, filter, members, users...

bp-profile-search/bps-main.php 92% from 13 tests

The main PHP file in "BP Profile Search" ver. 5.4.8 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bp-profile-search.php" instead of "bps-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin3,201 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16595703,079
JavaScript3180114
XML1208

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.40
Average class complexity32.50
▷ Minimum class complexity8.00
▷ Maximum class complexity57.00
Average method complexity5.85
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods969.23%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions131
▷ Named functions12897.71%
▷ Anonymous functions32.29%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected