84% lh-buddypress-group-redirect

Code Review | LH Buddypress Group Redirect

WordPress plugin LH Buddypress Group Redirect scored84%from 54 tests.

About plugin

  • Plugin page: lh-buddypress-gro...
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 12, 2017
  • Latest release: Aug 1, 2022
  • Number of updates: 6
  • Update frequency: every 297.3 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /834 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
Installer ran successfully

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

Analyzing server-side resources used by LH Buddypress Group Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.15 ▼0.05
Dashboard /wp-admin3.32 ▲0.0148.50 ▼1.82
Posts /wp-admin/edit.php3.37 ▲0.0149.11 ▼5.52
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.44 ▼17.75
Media Library /wp-admin/upload.php3.24 ▲0.0134.88 ▼4.70

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

Browser metrics Passed 4 tests

LH Buddypress Group Redirect: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.311.87 ▲0.1841.14 ▼0.53
Dashboard /wp-admin2,195 ▲185.57 ▼0.0189.13 ▼2.4741.59 ▼1.92
Posts /wp-admin/edit.php2,103 ▼01.99 ▲0.0037.35 ▼3.9435.49 ▼0.31
Add New Post /wp-admin/post-new.php1,526 ▼023.57 ▲0.13644.12 ▲8.0456.67 ▲5.15
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0098.59 ▲0.1744.18 ▲1.65

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lh-buddypress-group-redirect/lh-buddypress-group-redirect.php:107

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Requires at least: Invalid version format
The official readme.txt might help

lh-buddypress-group-redirect/lh-buddypress-group-redirect.php Passed 13 tests

The main PHP script in "LH Buddypress Group Redirect" version 1.02 is automatically included on every request by WordPress
88 characters long description:
If user is a member of only one group redirect them from their groups page to that group

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 detected48 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2571548

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.50
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods350.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin