94% bp-profile-search

Code Review | BP Profile Search

WordPress plugin BP Profile Search scored 94% from 54 tests.

About plugin

  • Plugin page: bp-profile-search
  • Plugin version: 5.4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.9
  • WordPress version: 5.9.2
  • First release: Jun 29, 2010
  • Latest release: Mar 15, 2022
  • Number of updates: 200
  • Update frequency: every 21.4 days
  • Top authors: dontdream (100%)

Code review

54 tests

User reviews

64 reviews

Install metrics

10,000+ active / 549,580 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.01MB] [CPU: ▼294.18ms] Passed 4 tests

A check of server-side resources used by BP Profile Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0259.48 ▲4.24
Dashboard /wp-admin3.42 ▲0.0136.85 ▼4.77
Posts /wp-admin/edit.php3.65 ▲0.0142.67 ▼0.11
Add New Post /wp-admin/post-new.php6.89 ▼0.08109.30 ▼1,165.86
Media Library /wp-admin/upload.php3.31 ▲0.0125.82 ▼5.99

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BP Profile Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲2415.90 ▼0.105.72 ▼0.332.30 ▼0.44
Dashboard /wp-admin2,913 ▲556.14 ▼0.01123.68 ▼20.71159.84 ▼3.23
Posts /wp-admin/edit.php2,712 ▲213.25 ▲0.0165.18 ▲2.29138.39 ▼1.19
Add New Post /wp-admin/post-new.php1,782 ▲7121.74 ▲0.96458.57 ▼3.35155.31 ▼6.62
Media Library /wp-admin/upload.php1,719 ▲165.54 ▲0.03143.35 ▼7.31189.38 ▲1.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 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 plugin_basename() in wp-content/plugins/bp-profile-search/bps-main.php:13
    • > 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_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-admin.php:3
    • > 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 add_filter() in wp-content/plugins/bp-profile-search/bps-search.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bp-profile-search/bps-external.php:3
    • > 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 bps_escaped_details_data() in wp-content/plugins/bp-profile-search/templates/members/bps-details.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bps_escaped_filters_data() in wp-content/plugins/bp-profile-search/templates/members/bps-filters.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: filter, directory, users, search, members...

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

"BP Profile Search" version 5.4.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as 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 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,167 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16592703,045
JavaScript3180114
XML1208

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
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%
Functions130
▷ Named functions12797.69%
▷ Anonymous functions32.31%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin