94% bp-distance-search

Code Review | BP Distance Search

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

About plugin

  • Plugin page: bp-distance-search
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.8.1
  • First release: Mar 7, 2019
  • Latest release: May 8, 2021
  • Number of updates: 17
  • Update frequency: every 46.6 days
  • Top authors: dontdream (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 3,779 total downloads


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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼140.91ms] Passed 4 tests

A check of server-side resources used by BP Distance Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1241.02 ▲20.75
Dashboard /wp-admin3.06 ▲0.0153.27 ▼10.41
Posts /wp-admin/edit.php3.11 ▲0.0152.07 ▲2.59
Add New Post /wp-admin/post-new.php5.42 ▼0.01101.88 ▼553.60
Media Library /wp-admin/upload.php3.01 ▲0.0035.57 ▼2.23

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by BP Distance Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲13915.83 ▲0.2413.54 ▼2.7260.47 ▲10.02
Dashboard /wp-admin2,988 ▲575.92 ▼0.03148.28 ▼27.78113.94 ▼6.71
Posts /wp-admin/edit.php2,760 ▲212.72 ▲0.0278.19 ▼2.4094.50 ▲2.80
Add New Post /wp-admin/post-new.php1,696 ▲8115.71 ▼5.68450.33 ▲118.90113.68 ▼5.80
Media Library /wp-admin/upload.php1,826 ▲195.02 ▼0.00178.58 ▲3.80128.51 ▼1.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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)
Even though everything seems fine, this is not 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-distance-search/bds-location.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-distance-search/bds-main.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: distance, search, location, filter, buddypress...

bp-distance-search/bds-main.php 92% from 13 tests

The main PHP script in "BP Distance Search" version 1.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("bp-distance-search.php" instead of "bds-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected328 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions13100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
There were not PNG files found in your plugin