83% wc-walletdoc-payment-gateway

Code Review | Walletdoc Payment Gateway for WooCommerce

WordPress plugin Walletdoc Payment Gateway for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-walletdoc-paym...
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 19, 2020
  • Latest release: Aug 29, 2023
  • Number of updates: 52
  • Update frequency: every 18.9 days
  • Top authors: dwagnerwd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,725 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by Walletdoc Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.46 ▲0.87
Dashboard /wp-admin3.31 ▲0.0039.52 ▼29.23
Posts /wp-admin/edit.php3.36 ▲0.0047.46 ▲2.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0074.97 ▼12.81
Media Library /wp-admin/upload.php3.23 ▲0.0032.69 ▼2.67

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Walletdoc Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲814.73 ▲0.171.73 ▼0.3437.54 ▼6.45
Dashboard /wp-admin2,203 ▲235.62 ▼0.0695.21 ▼4.2243.95 ▲0.14
Posts /wp-admin/edit.php2,105 ▲51.99 ▼0.0340.18 ▲4.2938.43 ▲0.80
Add New Post /wp-admin/post-new.php1,533 ▲523.16 ▲0.11636.43 ▼58.7352.50 ▼0.47
Media Library /wp-admin/upload.php1,408 ▲84.23 ▲0.1497.33 ▼3.6042.31 ▼4.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Gateway_Walletdoc' not found in wp-content/plugins/wc-walletdoc-payment-gateway/payment_token.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: walletdoc, credit card, woocommerce, debit card, eft...

wc-walletdoc-payment-gateway/woocoomerce-walletdoc.php 77% from 13 tests

Analyzing the main PHP file in "Walletdoc Payment Gateway for WooCommerce" version 1.5.1
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-walletdoc-payment-gateway.php" instead of "woocoomerce-walletdoc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,320 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,2523442,018
JavaScript372189292
CSS21010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity37.00
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods67
▷ Static methods45.97%
▷ Public methods67100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.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 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png8.30KB3.84KB▼ 53.68%
assets/icon11.png9.15KB3.51KB▼ 61.60%