84% bp-xprofile-location

Code Review | BP xProfile Location

WordPress plugin BP xProfile Location scored84%from 54 tests.

About plugin

  • Plugin page: bp-xprofile-location
  • Plugin version: 4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: May 17, 2016
  • Latest release: Dec 23, 2022
  • Number of updates: 77
  • Update frequency: every 31.3 days
  • Top authors: shanebp (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /24,934 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
The plugin installed gracefully, with no errors

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

Server-side resources used by BP xProfile Location
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.22 ▲0.80
Dashboard /wp-admin3.32 ▲0.0143.42 ▼6.69
Posts /wp-admin/edit.php3.37 ▲0.0144.73 ▼4.04
Add New Post /wp-admin/post-new.php5.90 ▲0.01102.26 ▲1.67
Media Library /wp-admin/upload.php3.24 ▲0.0133.36 ▼3.64

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for BP xProfile Location
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.47 ▲0.101.90 ▼0.1943.70 ▼3.19
Dashboard /wp-admin2,210 ▲255.90 ▲0.04100.46 ▼22.8241.09 ▼5.54
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0139.98 ▲1.8734.74 ▲4.02
Add New Post /wp-admin/post-new.php1,532 ▲323.12 ▲4.64688.91 ▲73.3157.15 ▲5.69
Media Library /wp-admin/upload.php1,395 ▲74.27 ▲0.0499.87 ▼8.6442.71 ▼2.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant PP_BPS - assumed 'PP_BPS' (this will throw an Error in a future version of PHP) in wp-content/plugins/bp-xprofile-location/inc/pp-location-search-support.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-xprofile-location/inc/pp-location-search-support.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
9 plugin tags: buddyboss, map, geocode, buddypress, xprofile...

bp-xprofile-location/loader.php 85% from 13 tests

The main PHP script in "BP xProfile Location" version 4.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("bp-xprofile-location.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected609 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP621142609

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity33.00
▷ Minimum class complexity14.00
▷ Maximum class complexity52.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
Constants6
▷ Global constants6100.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
No PNG files were detected