89% tips-donations-at-checkout

Code Review | Tips & Donations at WooCommerce Checkout

WordPress plugin Tips & Donations at WooCommerce Checkout scored89%from 54 tests.

About plugin

  • Plugin page: tips-donations-at...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 23, 2022
  • Latest release: Jun 23, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: Elvin.Haci (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Tips & Donations at WooCommerce Checkout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.01 ▼6.02
Dashboard /wp-admin3.35 ▲0.0443.45 ▼0.42
Posts /wp-admin/edit.php3.40 ▲0.0445.83 ▲0.29
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.78 ▼22.97
Media Library /wp-admin/upload.php3.27 ▲0.0434.66 ▲1.47
Tips & Donations /wp-admin/admin.php?page=tips-donations-at-checkout/wtd_admin.php3.2430.04

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 15 new options
New WordPress options
can_compress_scripts
widget_recent-comments
guaven_wtd_custom_amount_text
guaven_wtd_type
guaven_wtd_notice
db_upgraded
guaven_wtd_notice_hideafter
guaven_wtd_field_name
guaven_wtd_custom_amount
guaven_wtd_custom_amount_button
...

Browser metrics Passed 4 tests

An overview of browser requirements for Tips & Donations at WooCommerce Checkout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲2113.44 ▼1.161.13 ▼1.0353.63 ▲7.18
Dashboard /wp-admin2,203 ▲125.82 ▼0.04103.31 ▲0.1939.39 ▼0.75
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0638.98 ▼0.1635.87 ▼5.67
Add New Post /wp-admin/post-new.php1,532 ▲1523.25 ▲5.52632.55 ▲23.2152.92 ▼5.43
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0392.82 ▼6.0243.26 ▲2.15
Tips & Donations /wp-admin/admin.php?page=tips-donations-at-checkout/wtd_admin.php9462.0724.0633.11

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 15 options
    • guaven_wtd_notice
    • guaven_wtd_installed_100
    • guaven_wtd_custom_amount
    • widget_recent-posts
    • guaven_wtd_field_name
    • guaven_wtd_custom_amount_button
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • guaven_wtd_tip_options
    • ...

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
6 plugin tags: donate, woocommerce donation, tip, checkout field, woocommerce tip...

tips-donations-at-checkout/tips-donations-at-checkout.php 85% from 13 tests

Analyzing the main PHP file in "Tips & Donations at WooCommerce Checkout" version 1.0.0
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
No dangerous file extensions were detected340 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46912340

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin