84% kupay-for-woocommerce

Code Review | Kupay One-Click Checkout for WooCommerce

WordPress plugin Kupay One-Click Checkout for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: kupay-for-woocomm...
  • Plugin version: 1.1.12
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Oct 22, 2021
  • Latest release: Feb 23, 2022
  • Number of updates: 28
  • Update frequency: every 4.4 days
  • Top authors: jafatkupayco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /484 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.68MB] [CPU: ▼16.57ms] Passed 4 tests

An overview of server-side resources used by Kupay One-Click Checkout for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.88 ▼5.08
Dashboard /wp-admin3.32 ▲0.0145.14 ▼6.58
Posts /wp-admin/edit.php3.37 ▲0.0146.81 ▲1.42
Add New Post /wp-admin/post-new.php3.13 ▼2.7635.23 ▼56.05
Media Library /wp-admin/upload.php3.24 ▲0.0136.42 ▲3.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Kupay One-Click Checkout for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲7214.41 ▲0.111.92 ▼0.0637.50 ▼6.32
Dashboard /wp-admin2,218 ▲335.85 ▼0.03106.12 ▲6.8641.87 ▼1.04
Posts /wp-admin/edit.php2,101 ▲122.06 ▲0.0539.99 ▲3.7138.37 ▲6.50
Add New Post /wp-admin/post-new.php1,529 ▼423.24 ▲0.18638.11 ▼38.3663.87 ▲8.03
Media Library /wp-admin/upload.php1,400 ▲124.27 ▲0.1094.63 ▼10.7839.36 ▼5.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kupay-for-woocommerce/includes/api.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kupay-for-woocommerce/includes/api.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

kupay-for-woocommerce/kupay-woocommerce.php 92% from 13 tests

This is the main PHP file of "Kupay One-Click Checkout for WooCommerce" version 1.1.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kupay-for-woocommerce.php" instead of "kupay-woocommerce.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
Good job! No executable or dangerous file extensions detected703 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP919256537
JavaScript2232139
CSS141025
Markdown1002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin