90% lkn-wc-gateway-cielo

Code Review | Payment Gateway for Cielo API on WooCommerce

WordPress plugin Payment Gateway for Cielo API on WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: lkn-wc-gateway-cielo
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Jul 8, 2022
  • Latest release: Nov 27, 2023
  • Number of updates: 27
  • Update frequency: every 18.8 days
  • Top authors: linknacional (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,668 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Server-side resources used by Payment Gateway for Cielo API on WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.16 ▼4.36
Dashboard /wp-admin3.31 ▲0.0045.26 ▼5.93
Posts /wp-admin/edit.php3.36 ▲0.0049.48 ▲1.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.13 ▲3.41
Media Library /wp-admin/upload.php3.24 ▲0.0034.42 ▲1.83

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

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

Browser metrics Passed 4 tests

Payment Gateway for Cielo API on WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.37 ▼0.022.12 ▲0.3543.30 ▼1.95
Dashboard /wp-admin2,195 ▲215.56 ▲0.0289.22 ▼10.1341.50 ▼3.59
Posts /wp-admin/edit.php2,100 ▼02.08 ▲0.0739.47 ▲0.9036.63 ▼0.01
Add New Post /wp-admin/post-new.php1,534 ▼125.38 ▲0.17581.40 ▼17.9973.51 ▲6.90
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0194.99 ▼2.0042.35 ▲1.51

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • 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 everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Credit card configuration of payment method;), #2 (Debit card configuration of payment method;), #3 (Credit card front page with payment fields;), #4 (Debit card front page with payment fields.)
Please take inspiration from this readme.txt

lkn-wc-gateway-cielo/lkn-wc-gateway-cielo.php Passed 13 tests

The primary PHP file in "Payment Gateway for Cielo API on WooCommerce" version 1.6.0 is used by WordPress to initiate all plugin functionality
68 characters long description:
Adds the Cielo API 3.0 Payments gateway to your WooCommerce website.

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 detected2,451 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP42933911,400
JavaScript713880792
PO File1881178
CSS39151
JSON10030

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity58.67
▷ Minimum class complexity22.00
▷ Maximum class complexity81.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes3100.00%
Methods40
▷ Static methods1332.50%
▷ Public methods2972.50%
▷ Protected methods00.00%
▷ Private methods1127.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin