78% deposits-partial-payments-for-woocommerce

Code Review | Deposits & Partial Payments for WooCommerce

WordPress plugin Deposits & Partial Payments for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: deposits-partial-...
  • Plugin version: 1.1.16
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 12, 2021
  • Latest release: Nov 16, 2023
  • Number of updates: 37
  • Update frequency: every 23.3 days
  • Top authors: acowebscd (100%)

Code review

54 tests

User reviews

49 reviews

Install metrics

3,000+ active /48,465 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.50MB] [CPU: ▼2.42ms] Passed 4 tests

Analyzing server-side resources used by Deposits & Partial Payments for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4139.39 ▲0.51
Dashboard /wp-admin3.88 ▲0.5747.74 ▼6.75
Posts /wp-admin/edit.php3.93 ▲0.5749.77 ▲4.22
Add New Post /wp-admin/post-new.php6.41 ▲0.5290.35 ▼6.66
Media Library /wp-admin/upload.php3.74 ▲0.5135.09 ▲3.21

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Deposits & Partial Payments for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.16 ▼0.181.71 ▼0.1143.13 ▼6.05
Dashboard /wp-admin2,192 ▲125.49 ▼0.1286.18 ▼13.4338.83 ▼4.61
Posts /wp-admin/edit.php2,097 ▼32.00 ▼0.0033.57 ▼4.9136.37 ▲1.14
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▲0.05601.11 ▼39.6460.50 ▲10.21
Media Library /wp-admin/upload.php1,397 ▼34.27 ▲0.09101.43 ▲2.1942.73 ▼4.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/deposits-partial-payments-for-woocommerce/includes/views/admin-root.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/deposits-partial-payments-for-woocommerce/start.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order' not found in wp-content/plugins/deposits-partial-payments-for-woocommerce/includes/class-awcdp-order.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

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

"Deposits & Partial Payments for WooCommerce" version 1.1.16's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("deposits-partial-payments-for-woocommerce.php" instead of "start.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,525 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,0627074,184
Sass180123
JavaScript5112109
SVG70091
XML10012
CSS2406

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity99.62
▷ Minimum class complexity10.00
▷ Maximum class complexity520.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods226
▷ Static methods83.54%
▷ Public methods20389.82%
▷ Protected methods229.73%
▷ Private methods10.44%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants12
▷ Global constants12100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.44KB0.38KB▼ 14.19%
assets/images/loading_ui.png2.07KB1.67KB▼ 19.42%
assets/images/logo.png4.10KB2.99KB▼ 26.97%
assets/images/prite1.png2.76KB1.13KB▼ 59.25%