77% bp-user-profile-reviews

Code Review | Wbcom Designs - BuddyPress Member Reviews

WordPress plugin Wbcom Designs - BuddyPress Member Reviews scored77%from 54 tests.

About plugin

  • Plugin page: bp-user-profile-r...
  • Plugin version: 2.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Jun 15, 2017
  • Latest release: Aug 16, 2023
  • Number of updates: 30
  • Update frequency: every 75.1 days
  • Top authors: wbcomdesigns (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

600+ active /27,330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by Wbcom Designs - BuddyPress Member Reviews
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.77 ▲6.06
Dashboard /wp-admin3.31 ▲0.0050.41 ▼2.69
Posts /wp-admin/edit.php3.36 ▲0.0045.55 ▼6.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.06 ▼13.79
Media Library /wp-admin/upload.php3.23 ▲0.0038.31 ▲1.55

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Wbcom Designs - BuddyPress Member Reviews
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.28 ▼0.072.08 ▲0.4443.70 ▲1.58
Dashboard /wp-admin2,192 ▲155.61 ▼0.0189.61 ▼1.8842.62 ▼2.41
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0335.14 ▼2.9333.90 ▼4.42
Add New Post /wp-admin/post-new.php1,535 ▲918.03 ▼5.12658.06 ▲48.6172.07 ▲22.64
Media Library /wp-admin/upload.php1,394 ▼64.14 ▼0.05105.18 ▼4.4742.71 ▼5.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bp-user-profile-reviews/includes/templates/bupr-edit-review-form.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/bp-user-profile-reviews/admin/wbcom/templates/wbcom-support-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/bp-user-profile-reviews/admin/wbcom/templates/wbcom-license-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-user-profile-reviews/includes/widgets/member-rating.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-user-profile-reviews/includes/widgets/display-review.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/bp-user-profile-reviews/admin/wbcom/templates/wbcom-plugins-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bp-user-profile-reviews/admin/class-bupr-admin-feedback.php:311
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bp-user-profile-reviews/includes/bupr-genral-functions.php:140

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 86% 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 need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Members Directory View), #2 (Members Single Profile View), #3 (Members Add a Review section), #4 (Plugin Settings)
You can take inspiration from this readme.txt

bp-user-profile-reviews/buddypress-member-review.php 77% from 13 tests

This is the main PHP file of "Wbcom Designs - BuddyPress Member Reviews" version 2.9.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 355 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bp-user-profile-reviews.php" instead of "buddypress-member-review.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
No dangerous file extensions were detected14,647 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP285229804,969
CSS64901253,003
SVG1002,671
JSON2002,370
PO File1249290765
JavaScript66190740
YAML110121
XML1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity44.00
▷ Minimum class complexity11.00
▷ Maximum class complexity116.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods92
▷ Static methods00.00%
▷ Public methods92100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 1.26MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/wbcom/assets/imgs/logowbcom.png10.12KB3.87KB▼ 61.72%
screenshot-1.png244.62KB65.13KB▼ 73.38%
assets/images/star_half.png0.72KB0.81KB0.00%
admin/wbcom/assets/imgs/bp_member_review.png12.17KB6.30KB▼ 48.24%
admin/wbcom/assets/imgs/wbcom-offer-notice.png67.64KB32.40KB▼ 52.11%