84% woo-wallet

Code Review | TeraWallet – Best WooCommerce Wallet System With Cashback Rewards, Partial Payment, Wallet Refunds

WordPress plugin TeraWallet – Best WooCommerce Wallet System With Cashback Rewards, Partial Payment, Wallet Refunds scored84%from 54 tests.

About plugin

  • Plugin page: woo-wallet
  • Plugin version: 1.4.10
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Dec 12, 2017
  • Latest release: Nov 23, 2023
  • Number of updates: 90
  • Update frequency: every 24.2 days
  • Top authors: subratamal (100%)

Code review

54 tests

User reviews

174 reviews

Install metrics

20,000+ active /644,238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.05ms] Passed 4 tests

This is a short check of server-side resources used by TeraWallet – Best WooCommerce Wallet System With Cashback Rewards, Partial Payment, Wallet Refunds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.65 ▼13.53
Dashboard /wp-admin3.31 ▲0.0145.10 ▼4.73
Posts /wp-admin/edit.php3.36 ▲0.0045.38 ▼2.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.57 ▼3.01
Media Library /wp-admin/upload.php3.23 ▲0.0034.12 ▲0.84

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 103 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for TeraWallet – Best WooCommerce Wallet System With Cashback Rewards, Partial Payment, Wallet Refunds
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.54 ▲0.201.58 ▼0.2738.54 ▼3.94
Dashboard /wp-admin2,201 ▲215.63 ▼0.0593.07 ▼9.2943.94 ▲1.91
Posts /wp-admin/edit.php2,110 ▲102.14 ▲0.1439.57 ▲1.4338.66 ▲2.18
Add New Post /wp-admin/post-new.php1,535 ▲923.07 ▼0.33588.98 ▼46.8549.02 ▼13.56
Media Library /wp-admin/upload.php1,409 ▲124.25 ▲0.0194.56 ▼6.4143.15 ▲1.71

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-wallet/includes/admin/class-woo-wallet-transaction-details.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-wallet/includes/admin/class-woo-wallet-balance-details.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/woo-wallet/includes/class-woo-wallet-payments-blocks.php:9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woo-wallet/includes/admin/class-woo-wallet-transaction-details.php on line 11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woo-wallet/includes/admin/class-woo-wallet-balance-details.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-wallet/includes/admin/class-woo-wallet-transaction-details.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-wallet/includes/admin/class-woo-wallet-balance-details.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woo_wallet() in wp-content/plugins/woo-wallet/includes/class-woo-wallet-extensions.php:362
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woo-wallet/includes/class-woo-wallet-widgets.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woo_wallet() in wp-content/plugins/woo-wallet/includes/class-woo-wallet-settings.php:522

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: woocommerce wallet, wc wallet, woocommerce credits, partial payment, woo wallet...

woo-wallet/woo-wallet.php 92% from 13 tests

The main PHP script in "TeraWallet – Best WooCommerce Wallet System With Cashback Rewards, Partial Payment, Wallet Refunds" version 1.4.10 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "5.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin10,305 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PHP547943,1778,072
CSS942491,232
JavaScript173940535
Sass3120436
SVG10030

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity25.05
▷ Minimum class complexity2.00
▷ Maximum class complexity110.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes12.70%
▷ Concrete classes3697.30%
▷ Final classes25.56%
Methods412
▷ Static methods409.71%
▷ Public methods37791.50%
▷ Protected methods163.88%
▷ Private methods194.61%
Functions39
▷ Named functions3897.44%
▷ Anonymous functions12.56%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wallet-importer.png39.88KB15.83KB▼ 60.31%
assets/images/wallet-affiliatewp.png44.98KB17.52KB▼ 61.05%
assets/jquery/css/images/ui-icons_777777_256x240.png7.00KB4.18KB▼ 40.22%
assets/jquery/css/images/ui-icons_555555_256x240.png6.96KB4.18KB▼ 39.91%
assets/jquery/css/images/ui-icons_777620_256x240.png4.56KB4.18KB▼ 8.31%