10% bp-group-documents

Code Review | BP Group Documents

WordPress plugin BP Group Documents scored10%from 54 tests.

About plugin

  • Plugin page: bp-group-documents
  • Plugin version: 1.24
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.6, BuddyPress 1.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 30, 2013
  • Latest release: Sep 28, 2023
  • Number of updates: 87
  • Update frequency: every 42.3 days
  • Top authors: lenasterg (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /58,028 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/bp-group-documents/loader.php+216
    Use of undefined constant BP_VERSION - assumed 'BP_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.04ms] Passed 4 tests

A check of server-side resources used by BP Group Documents
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.08 ▼2.78
Dashboard /wp-admin3.36 ▲0.0148.55 ▼19.14
Posts /wp-admin/edit.php3.41 ▲0.0553.54 ▲2.99
Add New Post /wp-admin/post-new.php5.94 ▲0.0595.28 ▼4.98
Media Library /wp-admin/upload.php3.28 ▲0.0536.41 ▼1.25

Server storage [IO: ▲0.83MB] [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: 93 new files
Database: 1 new table, 16 new options
New tables
wp_bp_group_documents
New WordPress options
db_upgraded
bp_group_documents_enable_all_groups
theysaidso_admin_options
bp-group-documents-db-version
bp_group_documents_use_categories
bp_group_documents_forum_attachments
widget_theysaidso_widget
bp_group_documents_items_per_page
bp_group_documents_upload_permission
bp_group_documents_nav_page_name
...

Browser metrics Passed 4 tests

BP Group Documents: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.381.76 ▲0.0737.30 ▼4.29
Dashboard /wp-admin2,209 ▲184.87 ▲0.00111.76 ▼2.2141.02 ▼1.98
Posts /wp-admin/edit.php2,086 ▼62.18 ▲0.1739.52 ▼0.4934.98 ▲0.62
Add New Post /wp-admin/post-new.php1,542 ▲818.29 ▼5.03614.69 ▼71.1351.50 ▼3.79
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.1196.75 ▼18.6442.19 ▼4.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_bp_group_documents
  • This plugin does not fully uninstall, leaving 16 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • bp_group_documents_use_categories
    • can_compress_scripts
    • bp_group_documents_forum_attachments
    • widget_recent-comments
    • bp_group_documents_progress_bar
    • bp_group_documents_display_icons
    • bp_group_documents_upload_permission
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function buddypress() in wp-content/plugins/bp-group-documents/templates/groups/single/documents.php:6

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Admin settings page), #2 (Documents settings page on group creation), #3 (Upload document form), #4 (Document list tab), #5 (Ties into site activity stream (for public groups only)), #6 (Group admin document's settings tab, allow category's edit, addition), #7 (User options for email notifications), #8 (Widget Recent Documents from your groups and Widget Popular Group Documents), #9 (Message when non member of a private or hidden group tries to access a group document)
You can take inspiration from this readme.txt

bp-group-documents/loader.php 85% from 13 tests

This is the main PHP file of "BP Group Documents" version 1.24, 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: The principal plugin file should be the same as the plugin slug ("bp-group-documents.php" instead of "loader.php")
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WP 4.6, BuddyPress 1.7")

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
Success! There were no dangerous files found in this plugin6,157 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PO File91,1921,9122,987
PHP134939422,914
CSS428151
JavaScript21732105

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity37.86
▷ Minimum class complexity15.00
▷ Maximum class complexity85.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods65
▷ Static methods812.31%
▷ Public methods5584.62%
▷ Protected methods00.00%
▷ Private methods1015.38%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants23100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
46 compressed PNG files occupy 0.41MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/page_white_ruby.png0.61KB0.65KB0.00%
images/documents-stack_16x16.png0.58KB0.47KB▼ 18.18%
screenshot-2.png16.14KB8.19KB▼ 49.25%
images/icons/package.png0.83KB0.98KB0.00%
images/icons/page_white_zip.png0.38KB0.53KB0.00%