78% donation-or-tip-for-woocommerce

Code Review | Donation or Tip For Woocommerce

WordPress plugin Donation or Tip For Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: donation-or-tip-f...
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 13, 2023
  • Latest release: Oct 13, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: howdytheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /29 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼6.34ms] Passed 4 tests

Server-side resources used by Donation or Tip For Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2335.86 ▼4.95
Dashboard /wp-admin3.51 ▲0.2145.91 ▼4.10
Posts /wp-admin/edit.php3.63 ▲0.2751.58 ▼1.03
Add New Post /wp-admin/post-new.php6.11 ▲0.2386.43 ▼15.29
Media Library /wp-admin/upload.php3.44 ▲0.2137.46 ▲6.36
Donation or Tip /wp-admin/admin.php?page=dotfw-donation-tip3.4133.04

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 38 new options
New WordPress options
dotfw_bot_btn_fontsize
dotfw_display_on_checkout_page
db_upgraded
widget_recent-comments
dotfw_dot_btn_text_color
dotfw_donation_btn_text
dotfw_donation_field_style
dotfw_select_amount_types
dotfw_predefined_btn_lr_padding
dotfw_position_checkout_page
...

Browser metrics Passed 4 tests

Checking browser requirements for Donation or Tip For Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲16513.58 ▼1.048.70 ▲7.0937.67 ▼2.43
Dashboard /wp-admin2,221 ▲445.80 ▲0.1989.47 ▲3.0436.20 ▼9.21
Posts /wp-admin/edit.php2,134 ▲552.31 ▲0.3041.96 ▲4.8735.78 ▲1.27
Add New Post /wp-admin/post-new.php1,558 ▲3223.25 ▼0.15668.58 ▲0.6139.11 ▼34.21
Media Library /wp-admin/upload.php1,429 ▲294.50 ▲0.3099.20 ▼12.5243.84 ▼2.01
Donation or Tip /wp-admin/admin.php?page=dotfw-donation-tip2,5823.79119.5227.11

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 38 options in the database
    • dotfw_pred_val_btn_bg_hover_color
    • dotfw_dot_amount_order_table
    • dotfw_pred_val_btn_text_color
    • theysaidso_admin_options
    • dotfw_position_checkout_page
    • dotfw_predefined_btn_tb_padding
    • dotfw_remove_dot_btn_bg_color
    • dotfw_select_amount_types
    • dotfw_remove_dot_btn_text_color
    • dotfw_donation_field_style
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/donation-or-tip-for-woocommerce/donation-or-tip-for-woocommerce-main.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dotfw-donation-tip
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dotfw-donation-tip
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dotfw-donation-tip
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultString is deprecated since version 5.5.0! Use wp.i18n instead.
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dotfw-donation-tip
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #11, #2, #3, #4, #5, #6, #7, #8, #9 in donation-or-tip-for-woocommerce/assets to your readme.txt
  • Contributors: Contributors not specified
The official readme.txt might help

donation-or-tip-for-woocommerce/donation-or-tip-for-woocommerce-main.php 92% from 13 tests

The main file in "Donation or Tip For Woocommerce" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("donation-or-tip-for-woocommerce.php" instead of "donation-or-tip-for-woocommerce-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,417 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP34718833
JavaScript371186446
CSS21111138

PHP code Passed 2 tests

An short overview of 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.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin