77% wallet-system-for-woocommerce

Code Review | Wallet System for WooCommerce - Digital Wallet, Cashback Rewards, Recharge User Wallets, View Transaction History

WordPress plugin Wallet System for WooCommerce - Digital Wallet, Cashback Rewards, Recharge User Wallets, View Transaction History scored77%from 54 tests.

About plugin

  • Plugin page: wallet-system-for...
  • Plugin version: 2.5.4
  • PHP compatiblity: 7.3.5 or Higher+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 10, 2020
  • Latest release: Nov 15, 2023
  • Number of updates: 60
  • Update frequency: every 23.4 days
  • Top authors: wpswings (75%)makewebbetter (26.67%)

Code review

54 tests

User reviews

42 reviews

Install metrics

2,000+ active /56,884 total downloads

Benchmarks

Plugin footprint 82% 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.27ms] Passed 4 tests

Server-side resources used by Wallet System for WooCommerce - Digital Wallet, Cashback Rewards, Recharge User Wallets, View Transaction History
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.36 ▼4.22
Dashboard /wp-admin3.31 ▲0.0043.14 ▼5.28
Posts /wp-admin/edit.php3.36 ▲0.0048.12 ▲1.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.81 ▼12.79
Media Library /wp-admin/upload.php3.23 ▲0.0028.58 ▼2.78

Server storage [IO: ▲28.53MB] [DB: ▲0.07MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • The filesystem usage should be lower than 25MB (currently using 28.53MB)
Filesystem: 640 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Wallet System for WooCommerce - Digital Wallet, Cashback Rewards, Recharge User Wallets, View Transaction History
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.25 ▼0.091.78 ▼0.1741.11 ▼5.68
Dashboard /wp-admin2,195 ▲155.60 ▼0.0391.11 ▼12.3038.01 ▼5.77
Posts /wp-admin/edit.php2,100 ▲31.94 ▼0.0938.96 ▲1.5037.17 ▲3.26
Add New Post /wp-admin/post-new.php1,526 ▼023.58 ▲0.56668.18 ▼82.4652.52 ▼5.05
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.0799.93 ▼9.1541.81 ▼3.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wallet-system-for-woocommerce/common/partials/wallet-system-for-woocommerce-common-display.php
    • > /wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/sabberworm/php-css-parser/tests/quickdump.php
  • 183× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/sabberworm/php-css-parser/tests/Sabberworm/CSS/CSSList/DocumentTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/dompdf/dompdf/src/Positioner/TableCell.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/src/FrameReflower/Table.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/dompdf/dompdf/src/FrameDecorator/TableRowGroup.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/dompdf/dompdf/src/Positioner/Absolute.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hmtx.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Property/CSSNamespace.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/dompdf/dompdf/src/FrameReflower/Table.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/vendor/sabberworm/php-css-parser/tests/Sabberworm/CSS/RuleSet/LenientParsingTest.php:8
    • > PHP Notice
      Undefined variable: rootDir in wp-content/plugins/wallet-system-for-woocommerce/package/lib/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

wallet-system-for-woocommerce/wallet-system-for-woocommerce.php 85% from 13 tests

"Wallet System for WooCommerce - Digital Wallet, Cashback Rewards, Recharge User Wallets, View Transaction History" version 2.5.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 405 characters long)
  • Requires PHP: Required version number should use periods and dots only (ex. "7.0" instead of "7.3.5 or Higher")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected131,536 lines of code in 395 files:
LanguageFilesBlank linesComment linesLines of code
PHP26310,94018,75974,753
JavaScript2811,45923,14348,436
CSS639112445,042
PO File16371,1131,395
Markdown934101,030
JSON900580
XML632194
YAML312264
SVG120025
HTML10017

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity45.63
▷ Minimum class complexity1.00
▷ Maximum class complexity797.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces35
Interfaces6
Traits0
Classes281
▷ Abstract classes165.69%
▷ Concrete classes26594.31%
▷ Final classes00.00%
Methods3,504
▷ Static methods1795.11%
▷ Public methods3,01486.02%
▷ Protected methods35610.16%
▷ Private methods1343.82%
Functions55
▷ Named functions3054.55%
▷ Anonymous functions2545.45%
Constants277
▷ Global constants51.81%
▷ Class constants27298.19%
▷ Public constants272100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
package/lib/datatables/media/images/sort_asc_disabled.png0.14KB0.25KB0.00%
public/images/copy.png0.72KB0.65KB▼ 9.97%
public/images/wht-g.png1.01KB0.65KB▼ 35.17%
package/lib/datatables/media/images/sort_desc_disabled.png0.14KB0.25KB0.00%
admin/image/go-pro.png35.34KB14.65KB▼ 58.54%