83% wc-casys-payment

Code Review | Payment Gateway for Cpay with WooCommerce

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

About plugin

  • Plugin page: wc-casys-payment
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 11, 2020
  • Latest release: Mar 9, 2021
  • Number of updates: 15
  • Update frequency: every 5.9 days
  • Top authors: webpigment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,404 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.19ms] Passed 4 tests

This is a short check of server-side resources used by Payment Gateway for Cpay with WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.13 ▲2.94
Dashboard /wp-admin3.31 ▼0.0447.27 ▼13.35
Posts /wp-admin/edit.php3.36 ▲0.0046.07 ▼3.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.91 ▼25.45
Media Library /wp-admin/upload.php3.23 ▲0.0035.38 ▲1.04

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Payment Gateway for Cpay with WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.061.73 ▲0.0643.47 ▲2.03
Dashboard /wp-admin2,198 ▲215.62 ▼0.0585.55 ▼0.7841.26 ▼3.11
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0432.95 ▼4.1736.50 ▲1.98
Add New Post /wp-admin/post-new.php1,526 ▼323.04 ▼0.24675.42 ▼10.7652.72 ▼3.08
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.1498.41 ▼19.2744.39 ▼5.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wc-casys-payment/classes/class-wc-payment-gateway-for-cpay-with-woocommerce.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

wc-casys-payment/payment-gateway-for-cpay-with-woocommerce.php 77% from 13 tests

The main file in "Payment Gateway for Cpay with WooCommerce" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/i18n/languages/")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-casys-payment.php" instead of "payment-gateway-for-cpay-with-woocommerce.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 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 detected362 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22399325
Markdown19037

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods110.00%
▷ Private methods110.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin