84% wc-koin-official

Code Review | Koin Official Payments for WooCommerce

WordPress plugin Koin Official Payments for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-koin-official
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: May 13, 2022
  • Latest release: Aug 10, 2023
  • Number of updates: 26
  • Update frequency: every 17.5 days
  • Top authors: koinprodutos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /971 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.28ms] Passed 4 tests

An overview of server-side resources used by Koin Official Payments for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1043.33 ▲1.29
Dashboard /wp-admin3.44 ▲0.1049.65 ▼5.06
Posts /wp-admin/edit.php3.55 ▲0.1653.41 ▲1.57
Add New Post /wp-admin/post-new.php6.02 ▲0.0988.61 ▼14.93
Media Library /wp-admin/upload.php3.37 ▲0.1041.70 ▲4.41

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

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

Browser metrics Passed 4 tests

Koin Official Payments for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲18913.69 ▼0.6611.12 ▲9.3651.81 ▲9.21
Dashboard /wp-admin2,227 ▲475.69 ▲0.0686.32 ▼1.9139.73 ▼11.03
Posts /wp-admin/edit.php2,129 ▲292.17 ▲0.1636.60 ▼0.7733.57 ▼2.93
Add New Post /wp-admin/post-new.php1,556 ▲2823.36 ▲0.06651.84 ▼65.6153.93 ▲1.32
Media Library /wp-admin/upload.php1,432 ▲324.25 ▲0.03103.39 ▼4.2245.46 ▲0.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WKO\\Controllers\\Render' not found in wp-content/plugins/wc-koin-official/app/Controllers/Render/EditOrders.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WKO\\Controllers\\Gateways\\Gateway' not found in wp-content/plugins/wc-koin-official/app/Controllers/Gateways/Pix.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WKO\\Services\\Koin\\Requests\\Request' not found in wp-content/plugins/wc-koin-official/app/Services/Koin/Requests/Orders/Cancel.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WKO\\Controllers\\Render' not found in wp-content/plugins/wc-koin-official/app/Controllers/Render/KoinOrders.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wc-koin-official/app/Views/templates/thankyou-page/credit.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WKO\\Services\\Koin\\Requests\\Request' not found in wp-content/plugins/wc-koin-official/app/Services/Koin/Requests/Orders/Create.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WKO\\Controllers\\Render' not found in wp-content/plugins/wc-koin-official/app/Controllers/Render/ViewOrders.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WKO\\Services\\Koin\\Requests\\Request' not found in wp-content/plugins/wc-koin-official/app/Services/Koin/Requests/Orders/Get.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wc-koin-official/app/Views/templates/myaccount/order-details.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WKO\\Controllers\\Render' not found in wp-content/plugins/wc-koin-official/app/Controllers/Render/Notification.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: wirecard, loja, payments, store, cart...

wc-koin-official/wc-koin-official.php Passed 13 tests

The primary PHP file in "Koin Official Payments for WooCommerce" version 1.2.0 is used by WordPress to initiate all plugin functionality
31 characters long description:
Koin Official Payments Gateways

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected4,425 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
PHP659201,4823,601
PO File2316376699
JavaScript22294
SVG241024
JSON1005
CSS2022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.61
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces14
Interfaces3
Traits0
Classes43
▷ Abstract classes36.98%
▷ Concrete classes4093.02%
▷ Final classes00.00%
Methods234
▷ Static methods3916.67%
▷ Public methods16168.80%
▷ Protected methods3213.68%
▷ Private methods4117.52%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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
16 PNG files occupy 0.33MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/w-icon-256x256.png9.30KB4.50KB▼ 51.57%
resources/images/koin/b-koin-258.png2.87KB1.66KB▼ 42.20%
resources/images/koin/w-koin.png1.05KB0.85KB▼ 18.79%
resources/images/banner-772x250.png13.04KB4.99KB▼ 61.73%
resources/images/icon-128x128.png3.16KB1.84KB▼ 41.93%