84% bp-rewrites

Code Review | BP Rewrites

WordPress plugin BP Rewrites scored84%from 54 tests.

About plugin

  • Plugin page: bp-rewrites
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Apr 24, 2022
  • Latest release: Jul 30, 2023
  • Number of updates: 9
  • Update frequency: every 51.7 days
  • Top authors: imath (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /6,599 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.89ms] Passed 4 tests

A check of server-side resources used by BP Rewrites
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.02 ▼0.55
Dashboard /wp-admin3.33 ▲0.0252.92 ▼2.72
Posts /wp-admin/edit.php3.38 ▲0.0248.70 ▼2.71
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.15 ▼5.57
Media Library /wp-admin/upload.php3.25 ▲0.0240.69 ▲2.96

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 85 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BP Rewrites
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.36 ▼0.881.71 ▼0.0943.08 ▼2.23
Dashboard /wp-admin2,230 ▲424.85 ▼0.02102.88 ▼4.5842.66 ▼2.12
Posts /wp-admin/edit.php2,112 ▲232.03 ▼0.0336.30 ▼1.1035.28 ▼0.43
Add New Post /wp-admin/post-new.php1,552 ▲3823.32 ▲5.87692.82 ▲21.7362.04 ▲7.43
Media Library /wp-admin/upload.php1,412 ▲274.12 ▼0.08111.95 ▲2.2249.71 ▲6.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Almost there! Just fix the following items
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Notifications_Component' not found in wp-content/plugins/bp-rewrites/src/bp-notifications/classes/class-notifications-component.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Groups_Component' not found in wp-content/plugins/bp-rewrites/src/bp-groups/classes/class-groups-component.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Friends_Component' not found in wp-content/plugins/bp-rewrites/src/bp-friends/classes/class-friends-component.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BBP_Forums_Component' not found in wp-content/plugins/bp-rewrites/src/bp-plugins/bbpress/class-forums-component.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Messages_Component' not found in wp-content/plugins/bp-rewrites/src/bp-messages/classes/class-messages-component.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BBP_Forums_Group_Extension' not found in wp-content/plugins/bp-rewrites/src/bp-plugins/bbpress/class-forums-group-extension.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BP_XProfile_Component' not found in wp-content/plugins/bp-rewrites/src/bp-xprofile/classes/class-xprofile-component.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Activity_Component' not found in wp-content/plugins/bp-rewrites/src/bp-activity/classes/class-activity-component.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Settings_Component' not found in wp-content/plugins/bp-rewrites/src/bp-settings/classes/class-settings-component.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BP\\Rewrites\\add_action() in wp-content/plugins/bp-rewrites/src/bp-xprofile/screens/settings-profile.php:33

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

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: buddypress, rewrites, beta, feature-as-a-plugin

bp-rewrites/class-bp-rewrites.php 92% from 13 tests

This is the main PHP file of "BP Rewrites" version 1.6.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("bp-rewrites.php" instead of "class-bp-rewrites.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,643 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PHP801,8944,7567,354
PO File186104263
JavaScript14026

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity27.20
▷ Minimum class complexity3.00
▷ Maximum class complexity147.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods157
▷ Static methods85.10%
▷ Public methods13887.90%
▷ Protected methods159.55%
▷ Private methods42.55%
Functions248
▷ Named functions24498.39%
▷ Anonymous functions41.61%
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 files were detected