84% advanced-partial-payment-or-deposit-for-woocommerce

Code Review | Deposit & Partial Payments for WooCommerce - WpDepositly

WordPress plugin Deposit & Partial Payments for WooCommerce - WpDepositly scored84%from 54 tests.

About plugin

  • Plugin page: advanced-partial-...
  • Plugin version: 2.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Oct 24, 2021
  • Latest release: Nov 13, 2023
  • Number of updates: 65
  • Update frequency: every 11.1 days
  • Top authors: magepeopleteam (100%)Otto42 (3.08%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /10,985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Deposit & Partial Payments for WooCommerce - WpDepositly
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2243.15 ▲3.85
Dashboard /wp-admin3.59 ▲0.2446.08 ▼20.18
Posts /wp-admin/edit.php3.64 ▲0.2849.78 ▲1.91
Add New Post /wp-admin/post-new.php6.11 ▲0.2281.32 ▼19.57
Media Library /wp-admin/upload.php3.45 ▲0.2236.24 ▼0.30
Install WCPP Plugins /wp-admin/plugins.php?page=wcpp-plugins3.5233.42

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Deposit & Partial Payments for WooCommerce - WpDepositly
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7014.70 ▲0.581.77 ▲0.1346.16 ▲2.13
Dashboard /wp-admin2,222 ▲425.65 ▼0.0194.92 ▲1.1043.05 ▲0.02
Posts /wp-admin/edit.php2,131 ▲312.16 ▲0.1836.13 ▲0.5535.48 ▲0.22
Add New Post /wp-admin/post-new.php1,549 ▲2323.42 ▼0.24650.43 ▼73.3253.80 ▼7.91
Media Library /wp-admin/upload.php1,421 ▲214.23 ▲0.06102.75 ▼9.3443.35 ▼4.02
Install WCPP Plugins /wp-admin/plugins.php?page=wcpp-plugins8212.0441.5932.36

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/advanced-partial-payment-or-deposit-for-woocommerce/inc/templates/email/partial_payment_customer_template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/advanced-partial-payment-or-deposit-for-woocommerce/inc/templates/email/partial_payment_template.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed: The official readme.txt might help

advanced-partial-payment-or-deposit-for-woocommerce/advanced_partial_payment.php 92% from 13 tests

The main PHP file in "Deposit & Partial Payments for WooCommerce - WpDepositly" ver. 2.2.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-partial-payment-or-deposit-for-woocommerce.php" instead of "advanced_partial_payment.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected9,704 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,4231,3367,374
CSS315119980
JavaScript4113120818
PO File1215238532

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity38.59
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods229
▷ Static methods62.62%
▷ Public methods19082.97%
▷ Protected methods104.37%
▷ Private methods2912.66%
Functions87
▷ Named functions87100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.14MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/img/checklist_icon.png0.49KB0.50KB0.00%
asset/img/wcpp_pro_discount_ad.png144.20KB39.63KB▼ 72.52%