84% digital-wallet-for-woocommerce

Code Review | Digital wallet for woocommerce

WordPress plugin Digital wallet for woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: digital-wallet-fo...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2022
  • Latest release: Apr 25, 2023
  • Number of updates: 5
  • Update frequency: every 63.0 days
  • Top authors: sunarc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /431 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.47ms] Passed 4 tests

A check of server-side resources used by Digital wallet for woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.55 ▼0.44
Dashboard /wp-admin3.31 ▼0.0443.22 ▼12.95
Posts /wp-admin/edit.php3.36 ▲0.0042.87 ▼7.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.45 ▼20.04
Media Library /wp-admin/upload.php3.23 ▲0.0031.70 ▼1.37

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Digital wallet for woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.43 ▼0.921.69 ▼0.0441.77 ▲1.48
Dashboard /wp-admin2,206 ▲215.86 ▲0.94104.09 ▼9.7339.74 ▼4.78
Posts /wp-admin/edit.php2,086 ▼62.06 ▲0.0133.70 ▼8.9934.85 ▼2.39
Add New Post /wp-admin/post-new.php1,542 ▲2318.46 ▼4.78617.88 ▼63.6849.65 ▼6.07
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0195.77 ▼7.7040.35 ▼7.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/digital-wallet-for-woocommerce/admin/wallet-transactions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/digital-wallet-for-woocommerce/custom_payment_gateway.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires php: Version not formatted correctly
You can look at the official readme.txt

digital-wallet-for-woocommerce/digital-wallet-for-woocommerce.php Passed 13 tests

"Digital wallet for woocommerce" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
110 characters long description:
"Digital wallet for woocommerce" plugin will allow the user to purchase the product through the wallet system.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected709 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5180149676
JavaScript19029
CSS1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.00
▷ Minimum class complexity6.00
▷ Maximum class complexity18.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods111.11%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin