93% bp-custom-pages

Code Review | BP Custom Pages

WordPress plugin BP Custom Pages scored 93% from 54 tests.

About plugin

  • Plugin page: bp-custom-pages
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: WP 3.2.1, BuddyPress 1.5-5.8
  • WordPress version: 5.8.1
  • First release: Feb 22, 2021
  • Latest release: Aug 15, 2021
  • Number of updates: 26
  • Update frequency: every 6.8 days
  • Top authors: Venutius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 474 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by BP Custom Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1245.38 ▲14.43
Dashboard /wp-admin3.06 ▲0.0049.93 ▼5.62
Posts /wp-admin/edit.php3.11 ▲0.0053.61 ▲4.46
Add New Post /wp-admin/post-new.php5.42 ▼0.0293.17 ▼578.12
Media Library /wp-admin/upload.php3.00 ▲0.0035.50 ▼0.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

BP Custom Pages: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲9615.94 ▼0.078.30 ▼1.5356.18 ▲3.17
Dashboard /wp-admin2,967 ▲335.90 ▼0.04173.51 ▼10.98116.79 ▼14.19
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0176.73 ▲1.3096.00 ▼7.14
Add New Post /wp-admin/post-new.php1,683 ▲10218.77 ▲0.22388.64 ▼13.76115.39 ▼4.04
Media Library /wp-admin/upload.php1,810 ▲35.02 ▲0.01158.68 ▼10.06118.27 ▼12.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bp-custom-pages/includes/bp-custom-pages-functions.php:88
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-custom-pages/includes/bp-custom-pages-admin.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/bp-custom-pages/loader.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 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
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in bp-custom-pages/assets to your readme.txt
  • Requires at least: Version not formatted correctly
  • Donate link: Invalid URI found ("")
The official readme.txt might help

bp-custom-pages/loader.php 85% from 13 tests

The primary PHP file in "BP Custom Pages" version 1.1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "WP 3.2.1, BuddyPress 1.5")
  • Main file name: The principal plugin file should be the same as the plugin slug ("bp-custom-pages.php" instead of "loader.php")

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
Good job! No executable or dangerous file extensions detected515 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6175422515

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin