10% buddypress-compliments

Code Review | BuddyPress Compliments

WordPress plugin BuddyPress Compliments scored10%from 54 tests.

About plugin

  • Plugin page: buddypress-compli...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Jun 19, 2015
  • Latest release: Jun 13, 2022
  • Number of updates: 20
  • Update frequency: every 127.6 days
  • Top authors: paoltaia (80%)stiofansisland (15%)1naveengiri (10%)deployer (10%)

Code review

54 tests

User reviews

21 reviews

Install metrics

200+ active /22,252 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 did not install without errors
    • > Notice in wp-content/plugins/buddypress-compliments/bp-compliments.php+165
    Trying to get property 'table_prefix' of non-object

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

Analyzing server-side resources used by BuddyPress Compliments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.82 ▼0.39
Dashboard /wp-admin3.32 ▼0.0349.81 ▼14.02
Posts /wp-admin/edit.php3.37 ▲0.0151.31 ▲1.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.88 ▼2.82
Media Library /wp-admin/upload.php3.24 ▲0.0139.07 ▲1.51

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 37 new files
Database: 1 new table, 7 new options
New tables
wp_bp_compliments
New WordPress options
widget_recent-posts
can_compress_scripts
bp_compliments_version
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BuddyPress Compliments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▼0.211.60 ▼0.0737.64 ▼4.09
Dashboard /wp-admin2,195 ▲155.60 ▼0.0691.89 ▼0.7044.25 ▲2.90
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0539.25 ▲0.5736.04 ▼0.38
Add New Post /wp-admin/post-new.php1,526 ▼022.86 ▼0.47625.10 ▼56.6653.24 ▼3.76
Media Library /wp-admin/upload.php1,394 ▼64.24 ▼0.0398.55 ▼8.5445.67 ▼4.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_bp_compliments
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • bp_compliments_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/buddypress-compliments/includes/templates/buddypress/members/single/compliments.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-compliments/includes/bp-compliments-taxonomies.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-compliments/includes/bp-compliments-functions.php:168
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-compliments/includes/bp-compliments-forms.php:116
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-compliments/includes/bp-compliments-templatetags.php:151
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-compliments/includes/bp-compliments-settings.php:2

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 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can look at the official readme.txt

buddypress-compliments/bp-compliments.php 85% from 13 tests

Analyzing the main PHP file in "BuddyPress Compliments" version 1.1.1
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("buddypress-compliments.php" instead of "bp-compliments.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 detected2,140 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP153581,1511,691
PO File16898202
CSS1310179
JavaScript18451
YAML10017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.50
▷ Minimum class complexity10.00
▷ Maximum class complexity15.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods433.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions60
▷ Named functions60100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.47MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/icon-256x256.png4.94KB2.78KB▼ 43.73%
images/smiley-icon.png0.71KB0.67KB▼ 6.02%
.wordpress-org/screenshot-2.png96.01KB29.83KB▼ 68.93%
.wordpress-org/screenshot-4.png127.63KB42.34KB▼ 66.83%
.wordpress-org/screenshot-1.png62.46KB22.26KB▼ 64.37%