55% pos-entegrator

Code Review | POS Entegratör - WordPress Ödeme Eklentisi

WordPress plugin POS Entegratör - WordPress Ödeme Eklentisi scored55%from 54 tests.

About plugin

  • Plugin page: pos-entegrator
  • Plugin version: 3.7.11
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jun 3, 2023
  • Latest release: Nov 23, 2023
  • Number of updates: 181
  • Update frequency: every 1.0 days
  • Top authors: ftpyz (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

60+ active /2,971 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.84MB] [CPU: ▲14.02ms] 75% from 4 tests

This is a short check of server-side resources used by POS Entegratör - WordPress Ödeme Eklentisi
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 501.20ms on /wp-admin/admin.php?page=gpos-payment-gateway)
PageMemory (MB)CPU Time (ms)
Home /5.31 ▲1.8561.29 ▲17.68
Dashboard /wp-admin5.18 ▲1.8371.67 ▲4.80
Posts /wp-admin/edit.php5.22 ▲1.8667.39 ▲18.53
Add New Post /wp-admin/post-new.php7.72 ▲1.83112.17 ▲15.06
Media Library /wp-admin/upload.php5.10 ▲1.8760.68 ▲27.15
Virtual POS /wp-admin/admin.php?page=gpos-payment-gateways5.42528.19
Transactions /wp-admin/edit.php?post_type=gpos_transaction5.1564.26
Dashboard /wp-admin/admin.php?page=gurmepos5.43395.02
Settings /wp-admin/admin.php?page=gpos-settings5.43433.57
/wp-admin/admin.php?page=gpos-transaction5.43402.14
/wp-admin/admin.php?page=gpos-payment-gateway5.43501.20

Server storage [IO: ▲13.83MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 703 new files
Database: 3 new tables, 9 new options
New tables
wp_gpos_transaction_log
wp_gpos_redirect
wp_gpos_session
New WordPress options
gpos_transaction_process_type_children
gpos_submenu_pages
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
gpos_db_version
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by POS Entegratör - WordPress Ödeme Eklentisi
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17214.41 ▲0.071.81 ▲0.0844.08 ▼3.30
Dashboard /wp-admin2,301 ▲1205.64 ▼0.0497.17 ▼14.5143.80 ▲0.24
Posts /wp-admin/edit.php2,210 ▲1102.16 ▲0.2242.17 ▲2.2433.66 ▼2.75
Add New Post /wp-admin/post-new.php1,606 ▲7023.51 ▲0.57622.08 ▼12.3277.75 ▲25.40
Media Library /wp-admin/upload.php1,507 ▲1074.29 ▲0.06101.36 ▲5.6643.01 ▼1.50
Virtual POS /wp-admin/admin.php?page=gpos-payment-gateways2,0937.65237.2180.03
Transactions /wp-admin/edit.php?post_type=gpos_transaction1,2211.9738.7333.66
Dashboard /wp-admin/admin.php?page=gurmepos2,7558.44242.4098.08
Settings /wp-admin/admin.php?page=gpos-settings2,7478.52169.3963.57
/wp-admin/admin.php?page=gpos-transaction1,8477.52151.0472.74
/wp-admin/admin.php?page=gpos-payment-gateway1,8997.51136.1859.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_gpos_redirect
    • wp_gpos_transaction_log
    • wp_gpos_session
  • The uninstall procedure has failed, leaving 9 options in the database
    • can_compress_scripts
    • gpos_db_version
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • gpos_transaction_process_type_children
    • gpos_submenu_pages
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gpos-payment-gateway
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

SRP 0% from 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
Please fix the following
  • 70× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/subscription-samples/create_product.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/subscription-samples/list_customers.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/create_payment.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/subscription-samples/delete_product.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/subscription-samples/cancel_subscription.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/retrieve_apm.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/retrieve_cards.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/subscription-samples/create_subscription_with_customer_reference_code.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/api_test.php
    • > /wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/samples/cancel_with_reason.php
  • 333× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Iyzipay\\Model\\Mapper\\IyzipayResourceMapper' not found in wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/src/Iyzipay/Model/Mapper/Subscription/SubscriptionDetailsResourceMapper.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Iyzipay\\Model\\Mapper\\IyzipayResourceMapper' not found in wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/src/Iyzipay/Model/Mapper/Iyzilink/IyziLinkRetrieveProductResourceMapper.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GPOS_Options' not found in wp-content/plugins/pos-entegrator/includes/settings/class-gpos-form-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Iyzipay\\Request' not found in wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/src/Iyzipay/Request/Subscription/SubscriptionUpdatePricingPlanRequest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Iyzipay\\IyzipayResource' not found in wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/src/Iyzipay/Model/Iyzilink/IyziLinkSaveProductResource.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Iyzipay\\Model\\Mapper\\UCSInitializeResourceMapper' not found in wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/src/Iyzipay/Model/Mapper/UCSInitializeMapper.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Iyzipay\\IyzipayResource' not found in wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/src/Iyzipay/Model/Subscription/SubscriptionCreateCheckoutForm.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pos-entegrator/views/wc-gateway-disabled.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GPOS_Gateway' not found in wp-content/plugins/pos-entegrator/includes/payment-gateways/pro/class-gpos-kuveyt-turk.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Iyzipay\\Model\\Mapper\\RefundResourceMapper' not found in wp-content/plugins/pos-entegrator/vendor/iyzico/iyzipay-php/src/Iyzipay/Model/Mapper/RefundMapper.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=gpos-transaction
    • > Console-api (severe) in unknown
    /wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js 0:16584 TypeError: Cannot read properties of undefined (reading 'length')at /wp-content/plugins/pos-entegrator/assets/vue/js/transaction-3-7-11.js?ver=3.7.11:1:23963at n (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:19424)at Fb (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:36253)at Proxy. (/wp-content/plugins/pos-entegrator/assets/vue/Page-3-7-11.js:1:5634)at dc (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:19736)at Io.he [as fn] (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:56562)at Io.run (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:6707)at V.M.update (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:56843)at V (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:56870)at H (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:55671)
    • > GET request to /wp-admin/admin.php?page=gpos-payment-gateway
    • > Console-api (severe) in unknown
    /wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js 0:16584 TypeError: Cannot read properties of undefined (reading 'title')at Proxy. (/wp-content/plugins/pos-entegrator/assets/vue/js/payment-gateway-3-7-11.js?ver=3.7.11:1:10091)at dc (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:19736)at Io.he [as fn] (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:56562)at Io.run (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:6707)at V.M.update (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:56843)at V (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:56870)at H (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:55671)at G (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:55454)at v (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:52173)at He (/wp-content/plugins/pos-entegrator/assets/vue/vendor-3-7-11.js:1:60806)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: kredi kart, deme, checkout, pos, banka...

pos-entegrator/gurmepos.php 69% from 13 tests

The principal PHP file in "POS Entegratör - WordPress Ödeme Eklentisi" v. 3.7.11 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.8")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 366 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("pos-entegrator.php" instead of "gurmepos.php")

Code Analysis 97% from 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
There were no executable files found in this plugin45,337 lines of code in 652 files:
LanguageFilesBlank linesComment linesLines of code
PHP4935,0247,65924,342
SVG932118,034
PO File15697631,597
Markdown61300522
JavaScript471174367
JSON400246
CSS5263145
YAML2231167
Handlebars17017

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.93
▷ Minimum class complexity1.00
▷ Maximum class complexity212.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces14
Interfaces4
Traits3
Classes382
▷ Abstract classes61.57%
▷ Concrete classes37698.43%
▷ Final classes10.27%
Methods2,657
▷ Static methods2278.54%
▷ Public methods2,57796.99%
▷ Protected methods281.05%
▷ Private methods521.96%
Functions89
▷ Named functions7584.27%
▷ Anonymous functions1415.73%
Constants132
▷ Global constants96.82%
▷ Class constants12393.18%
▷ Public constants123100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
25 PNG files occupy 0.83MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/email/arrow-uturn-left.png0.32KB0.30KB▼ 4.88%
assets/images/settings/row_view.png31.35KB12.45KB▼ 60.28%
assets/email/check-circle.png0.59KB0.58KB▼ 1.98%
assets/images/pro.png37.01KB19.45KB▼ 47.44%
assets/images/settings/standart_form.png4.13KB2.24KB▼ 45.62%