90% paykun-gateway-woocommerce

Code Review | PayKun for WooCommerce

WordPress plugin PayKun for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: paykun-gateway-wo...
  • Plugin version: 3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-5.8.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2019
  • Latest release: Dec 27, 2021
  • Number of updates: 32
  • Update frequency: every 29.4 days
  • Top authors: paykun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,570 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.07MB] [CPU: ▼4.11ms] Passed 4 tests

This is a short check of server-side resources used by PayKun for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.17 ▼0.38
Dashboard /wp-admin3.39 ▲0.0451.88 ▼15.98
Posts /wp-admin/edit.php3.50 ▲0.1452.01 ▼1.82
Add New Post /wp-admin/post-new.php5.97 ▲0.08101.94 ▲1.75
Media Library /wp-admin/upload.php3.31 ▲0.0837.69 ▲1.84

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for PayKun for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.28 ▼1.091.74 ▼1.0641.27 ▼0.44
Dashboard /wp-admin2,206 ▲155.83 ▼0.03111.55 ▲3.9941.69 ▼0.46
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0237.31 ▼5.8532.06 ▼4.32
Add New Post /wp-admin/post-new.php1,514 ▼517.62 ▼5.79673.05 ▲8.7251.93 ▼1.23
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.03100.64 ▼10.1249.16 ▲2.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: india, paykun, woocommerce, ecommerce, payments

paykun-gateway-woocommerce/woo_com_paykun.php 92% from 13 tests

The primary PHP file in "PayKun for WooCommerce" version 3.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("paykun-gateway-woocommerce.php" instead of "woo_com_paykun.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 plugin769 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7291193768
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity11.43
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods45
▷ Static methods1431.11%
▷ Public methods3680.00%
▷ Protected methods00.00%
▷ Private methods920.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants49
▷ Global constants00.00%
▷ Class constants49100.00%
▷ Public constants49100.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 files were detected