10% buddypress-group-email-subscription

Code Review | BuddyPress Group Email Subscription

WordPress plugin BuddyPress Group Email Subscription scored10%from 54 tests.

About plugin

  • Plugin page: buddypress-group-...
  • Plugin version: 4.2.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.4
  • WordPress version: 6.3.1
  • First release: Mar 22, 2010
  • Latest release: Nov 1, 2023
  • Number of updates: 327
  • Update frequency: every 15.2 days
  • Top authors: boonebgorges (56.27%)dwenaus (44.04%)

Code review

54 tests

User reviews

32 reviews

Install metrics

5,000+ active /210,572 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription.php+40
    Use of undefined constant BP_VERSION - assumed 'BP_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.97ms] Passed 4 tests

An overview of server-side resources used by BuddyPress Group Email Subscription
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.24 ▼14.62
Dashboard /wp-admin3.38 ▲0.0745.93 ▼6.31
Posts /wp-admin/edit.php3.50 ▲0.1350.20 ▼1.18
Add New Post /wp-admin/post-new.php5.96 ▲0.0797.00 ▼5.77
Media Library /wp-admin/upload.php3.30 ▲0.0735.67 ▼0.70

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 78 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
ass_digest_time
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
ass_weekly_digest

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Group Email Subscription
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.16 ▼0.191.70 ▼0.0240.60 ▼1.96
Dashboard /wp-admin2,192 ▲155.58 ▼0.0091.32 ▼11.4239.61 ▼2.32
Posts /wp-admin/edit.php2,100 ▲31.98 ▲0.0138.20 ▲0.6035.61 ▲2.23
Add New Post /wp-admin/post-new.php1,535 ▲918.22 ▼4.84609.07 ▼18.9557.31 ▼13.79
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.1995.03 ▼6.5340.87 ▼0.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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • ass_weekly_digest
    • db_upgraded
    • ass_digest_time

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 126× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buddypress-group-email-subscription/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buddypress-group-email-subscription/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buddypress-group-email-subscription/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buddypress-group-email-subscription/vendor/composer/installers/src/Composer/Installers/GravInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buddypress-group-email-subscription/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buddypress-group-email-subscription/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buddypress-group-email-subscription/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'BPGES_Async_Request' not found in wp-content/plugins/buddypress-group-email-subscription/classes/class-bpges-async-request-send-queue.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bpges_subscription_levels() in wp-content/plugins/buddypress-group-email-subscription/templates/bpges/subscription-options-admin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/buddypress-group-email-subscription/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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:
  • Tags: There are too many tags (14 tag instead of maximum 10)
Please take inspiration from this readme.txt

buddypress-group-email-subscription/bp-activity-subscription.php 92% from 13 tests

The principal PHP file in "BuddyPress Group Email Subscription" v. 4.2.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("buddypress-group-email-subscription.php" instead of "bp-activity-subscription.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin16,480 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
PO File162,4673,4687,997
PHP1492,1083,5887,457
JSON400358
CSS1454209
YAML4367156
Markdown2680123
JavaScript1251290
Bourne Shell115459
XML20031

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity3.52
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes122
▷ Abstract classes43.28%
▷ Concrete classes11896.72%
▷ Final classes00.00%
Methods230
▷ Static methods3013.04%
▷ Public methods14563.04%
▷ Protected methods7331.74%
▷ Private methods125.22%
Functions182
▷ Named functions16791.76%
▷ Anonymous functions158.24%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/email.png0.31KB0.22KB▼ 27.30%
css/emailwide.png0.47KB0.39KB▼ 17.19%