84% godaddy-payments

Code Review | GoDaddy Payments for WooCommerce

WordPress plugin GoDaddy Payments for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: godaddy-payments
  • Plugin version: 1.6.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2021
  • Latest release: Nov 17, 2023
  • Number of updates: 60
  • Update frequency: every 16.0 days
  • Top authors: Godaddy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /21,701 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
Installer ran successfully

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

This is a short check of server-side resources used by GoDaddy Payments for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.22 ▼3.22
Dashboard /wp-admin3.31 ▼0.0346.81 ▼14.73
Posts /wp-admin/edit.php3.37 ▲0.0144.59 ▼0.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.85 ▼14.01
Media Library /wp-admin/upload.php3.24 ▲0.0132.63 ▲2.31

Server storage [IO: ▲7.65MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 399 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for GoDaddy Payments for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲3914.37 ▲0.021.73 ▼0.0438.80 ▼5.95
Dashboard /wp-admin2,203 ▲235.61 ▼0.0391.91 ▼10.6938.16 ▼7.58
Posts /wp-admin/edit.php2,115 ▲151.97 ▼0.0339.41 ▲2.2138.26 ▲3.02
Add New Post /wp-admin/post-new.php1,537 ▲1123.44 ▲0.08674.55 ▼29.2758.13 ▼6.89
Media Library /wp-admin/upload.php1,411 ▲84.24 ▲0.0694.62 ▼1.8641.19 ▼0.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SkyVerge\\WooCommerce\\PluginFramework\\v5_11_12\\Payment_Gateway\\Handlers\\Abstract_Payment_Handler' not found in wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php:39
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-order-partial-capture.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'GoDaddy\\WooCommerce\\Poynt\\Webhooks\\WebhooksHandler' not found in wp-content/plugins/godaddy-payments/src/Webhooks/PoyntWebhooksHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor.php:28
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 39
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/godaddy-payments/src/Shipping/LocalDelivery/LocalDelivery.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php:88
    • > PHP Notice
      Undefined variable: index in wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 35
    • > PHP Notice
      Undefined variable: token in wp-content/plugins/godaddy-payments/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/views/html-user-payment-token-editor-token.php on line 37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: woo, ecommerce, woocommerce, credit card, checkout...

godaddy-payments/godaddy-payments.php 92% from 13 tests

The main file in "GoDaddy Payments for WooCommerce" v. 1.6.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin56,585 lines of code in 301 files:
LanguageFilesBlank linesComment linesLines of code
PO File5314,80521,73133,627
PHP19210,66023,34221,501
JavaScript18176365605
Markdown21130423
CSS11430287
JSON100110
SVG230025
XML1007

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.18
▷ Minimum class complexity1.00
▷ Maximum class complexity274.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces43
Interfaces14
Traits1
Classes161
▷ Abstract classes3018.63%
▷ Concrete classes13181.37%
▷ Final classes00.00%
Methods2,019
▷ Static methods23211.49%
▷ Public methods1,37968.30%
▷ Protected methods56728.08%
▷ Private methods733.62%
Functions17
▷ Named functions15.88%
▷ Anonymous functions1694.12%
Constants159
▷ Global constants00.00%
▷ Class constants159100.00%
▷ Public constants15194.97%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 compressed PNG files occupy 0.09MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-visa-debit.png0.80KB0.86KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-echeck.png1.09KB1.15KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-mastercard.png3.87KB2.16KB▼ 44.22%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-amazon.png0.71KB0.75KB0.00%
vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/images/card-discover.png1.25KB1.30KB0.00%