84% deposits-for-woocommerce

Code Review | Deposits & Partial Payments for WooCommerce - Bayna

WordPress plugin Deposits & Partial Payments for WooCommerce - Bayna scored84%from 54 tests.

About plugin

  • Plugin page: deposits-for-wooc...
  • Plugin version: 1.2.11
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 28, 2020
  • Latest release: Aug 3, 2023
  • Number of updates: 62
  • Update frequency: every 16.3 days
  • Top authors: im_niloy (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

2,000+ active /37,823 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: ▲1.75MB] [CPU: ▲10.36ms] Passed 4 tests

A check of server-side resources used by Deposits & Partial Payments for WooCommerce - Bayna
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.21 ▲1.7549.48 ▲12.71
Dashboard /wp-admin5.04 ▲1.7457.12 ▲10.10
Posts /wp-admin/edit.php5.16 ▲1.8065.84 ▲20.74
Add New Post /wp-admin/post-new.php7.64 ▲1.76104.20 ▲0.83
Media Library /wp-admin/upload.php4.97 ▲1.7449.56 ▲17.78

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 191 new files
Database: no new tables, 7 new options
New WordPress options
ci_woo_deposits_installed
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Deposits & Partial Payments for WooCommerce - Bayna
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.77 ▲0.011.58 ▼0.1339.16 ▼0.05
Dashboard /wp-admin2,228 ▲374.90 ▼0.16112.24 ▲12.2842.06 ▼1.93
Posts /wp-admin/edit.php2,117 ▲282.04 ▲0.0441.98 ▲7.4637.02 ▲1.97
Add New Post /wp-admin/post-new.php1,537 ▲2323.18 ▼0.30604.57 ▼37.0062.23 ▲10.86
Media Library /wp-admin/upload.php1,413 ▲254.27 ▲0.0799.55 ▲1.3342.46 ▲1.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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: 7 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ci_woo_deposits_installed
    • widget_recent-posts

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 | 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
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/deposits-for-woocommerce/src/Emails/DepositOrder.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/deposits-for-woocommerce/src/Emails/FullPaid.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/deposits-for-woocommerce/src/Emails/NewDeposit.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/deposits-for-woocommerce/includes/core.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/deposits-for-woocommerce/includes/core.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Background_Process' not found in wp-content/plugins/deposits-for-woocommerce/src/Modules/UpdateDB.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: partial, payment, deposit, woocommerce, woocommerce deposits...

deposits-for-woocommerce/deposits-for-woocommerce.php 92% from 13 tests

The principal PHP file in "Deposits & Partial Payments for WooCommerce - Bayna" v. 1.2.11 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.9" instead of "5.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected42,001 lines of code in 179 files:
LanguageFilesBlank linesComment linesLines of code
PHP1334,8904,30920,769
CSS96495778,085
JavaScript91,3365106,643
Sass1797336,089
JSON620285
XML2611116
SVG30014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity24.75
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes91
▷ Abstract classes22.20%
▷ Concrete classes8997.80%
▷ Final classes22.25%
Methods609
▷ Static methods7512.32%
▷ Public methods54990.15%
▷ Protected methods233.78%
▷ Private methods376.08%
Functions45
▷ Named functions3680.00%
▷ Anonymous functions920.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/codestar/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/img/004.png0.31KB0.25KB▼ 21.74%