Code Analysis: Yoco Payments 3.1.0

Function Rating Maintainability Complexity Lines of code
Yoco\Gateway\Processors\PaymentProcessor::process()
A
48 9 31
Yoco\Integrations\Webhook\Vendors\WebhookSignatureValidator::verify()
S
49 7 30
Yoco\Gateway\Settings::fields()
S
43 5 52
Yoco\Gateway\Processors\OptionsProcessor::process()
S
52 7 22
Yoco\Gateway\Checkout\Availability::disableIfMissingCredentials()
S
59 7 14
Yoco\Helpers\Security\SSL::isSecure()
S
60 7 12
Yoco\Integrations\Yoco\Webhooks\Processors\RefundSucceededWebhookProcessor::process()
S
51 6 25
Yoco\Core\Setup::deactivateOnIncompatibileEnv()
S
53 6 23
Yoco\Gateway\Settings::handleThankYou()
S
53 6 23
Yoco\Gateway\Processors\RefundProcessor::process()
S
54 6 19
Yoco\Helpers\Validation\Validator::validate()
S
56 6 18
Yoco\Gateway\Processors\OptionsProcessor::saveInstallationData()
S
57 6 17
Yoco\Installations\InstallationsManager::setInstallationId()
S
56 5 17
Yoco\Installations\InstallationsManager::setWebhookSecret()
S
56 5 17
Yoco\Gateway\Processors\OptionsProcessor::validateKeys()
S
60 5 12
Yoco\Gateway\Checkout\Availability::disableIfMissingInstallation()
S
61 5 12
Yoco\Helpers\Validation\Validator::validateType()
S
57 4 18
Yoco\Integrations\Yoco\Webhooks\Controllers\WebhookController::handlePostRequest()
S
55 4 18
Yoco\Integrations\Yoco\Webhooks\Processors\RefundFailedWebhookProcessor::process()
S
58 4 15
Yoco\Helpers\Http\Client::post()
S
54 3 21
Yoco\Telemetry\Models\TelemetryObject::getInstalledPluginsDetails()
S
56 3 18
Yoco\Helpers\Logger::getErrorLogs()
S
56 3 18
Yoco\Integrations\Yoco\Requests\Refund::refund()
S
55 3 18
Yoco\Helpers\Logger::log()
S
58 3 16
Yoco\Repositories\OrdersRepository::getByYocoRefundId()
S
58 3 15
Yoco\Gateway\Checkout\Availability::disableIfIGatewayNotEnabled()
S
64 4 10
Yoco\Telemetry\Models\TelemetryObject::getActiveThemeDetails()
S
63 4 10
Yoco\Gateway\Checkout\Availability::disableIfMissingCheckoutUrl()
S
64 4 10
Yoco\Gateway\Checkout\Availability::disableIfInsecureConnection()
S
64 4 10
Yoco\Core\Setup::deactivateAsIncompatibileEnv()
S
63 4 10
Yoco\Repositories\OrdersRepository::getByYocoCheckoutId()
S
58 3 15
Yoco\Repositories\OrdersRepository::getByYocoPaymentId()
S
58 3 15
Yoco\Repositories\OrdersRepository::getOrders()
S
60 3 13
Yoco\Helpers\Admin\Notices::renderNotice()
S
60 3 13
Yoco\Gateway\Notes::addSessionIdNoteToOrder()
S
60 3 13
Yoco\Gateway\Notes::addPaymentIdNoteToOrder()
S
60 3 13
Yoco\Gateway\Notes::addRefundIdNoteToOrder()
S
60 3 13
Yoco\Integrations\Webhook\Vendors\WebhookSignatureValidator::verifyTimestamp()
S
60 3 13
Yoco\Installation\Installation::saveId()
S
61 3 12
Yoco\Installation\Installation::saveWebhookSecret()
S
61 3 12
Yoco\Integrations\Webhook\SignatureValidator::getSecret()
S
61 3 12
Yoco\Integrations\Yoco\Webhooks\Processors\PaymentWebhookProcessor::process()
S
60 3 12
Yoco\Helpers\Logger::getErrorLogFiles()
S
62 3 11
Yoco\Gateway\Checkout\Method::setMethod()
S
63 3 11
Yoco\Integrations\Yoco\Webhooks\Parsers\RefundWebhookPayloadParser::parse()
S
61 3 11
Yoco\Integrations\Yoco\Webhooks\Controllers\WebhookController::handleRequest()
S
65 3 10
Yoco\Gateway\Credentials::getSecretKey()
S
67 3 9
Yoco\Cron\CronScheduler::scheduleEvent()
S
65 3 9
Yoco\Telemetry\Models\TelemetryObject::getWcVersion()
S
70 3 6
Yoco\Telemetry\Models\TelemetryObject::getYocoPluginVersion()
S
70 3 6
Yoco\Telemetry\Models\TelemetryObject::getYocoPluginMode()
S
68 3 7
Yoco\Helpers\Logger::isDebugLogEnabled()
S
77 3 3
Yoco\Core\Actions::__construct()
S
71 3 5
Yoco\Helpers\Versioner::getDependenciesVersion()
S
66 3 9
Yoco\Gateway\Checkout\Method::setIcon()
S
67 3 7
Yoco\Gateway\Checkout\Method::setTitle()
S
67 3 7
Yoco\Installations\InstallationsManager::getInstallationId()
S
68 3 7
Yoco\Gateway\Checkout\Method::updateMethod()
S
64 3 10
Yoco\Installations\InstallationsManager::getWebhookSecret()
S
68 3 7
Yoco\Gateway\Credentials::getLivePublicKey()
S
70 3 6
Yoco\Gateway\Credentials::getLiveSecretKey()
S
70 3 6
Yoco\Gateway\Credentials::getTestPublicKey()
S
70 3 6
Yoco\Gateway\Credentials::getTestSecretKey()
S
70 3 6
Yoco\Init::__construct()
S
52 1 29
Yoco\Telemetry\Models\TelemetryObject::getInstalledThemesDetails()
S
61 2 13
Yoco\Helpers\Admin\Notices::displayAdminNotice()
S
62 2 12
Yoco\Telemetry\Telemetry::getData()
S
56 1 18
Yoco\Integrations\Yoco\Requests\Checkout::buildMetadata()
S
57 1 18
Yoco\Gateway\Gateway::__construct()
S
55 1 17
Yoco\Gateway\Models\Payload::toArray()
S
58 1 16
Yoco\Repositories\OrdersRepository::getById()
S
74 2 4
Yoco\Gateway\Admin\Notices::showTestModeNotice()
S
72 2 5
Yoco\Gateway\Gateway::admin_options()
S
67 2 7
Yoco\Repositories\OrdersRepository::getOrderById()
S
65 2 8
Yoco\Telemetry\Models\TelemetryObject::getDomain()
S
68 2 7
Yoco\Telemetry\Models\TelemetryObject::getPhpVersion()
S
71 2 6
Yoco\Gateway\Refund\Request::send()
S
64 2 10
Yoco\Gateway\Admin\Notices::showUnsupportedCurrencyNotice()
S
69 2 6
Yoco\Gateway\Admin\Notices::showInsecureConnectionNotice()
S
69 2 6
Yoco\Core\Constants::getInstallationApiUrl()
S
71 2 6
Yoco\Helpers\Logger::getGateway()
S
68 2 7
Yoco\Telemetry\Models\TelemetryObject::getSiteName()
S
70 2 6
Yoco\Core\Language::loadPluginTextDomain()
S
67 2 7
Yoco\Gateway\Metadata::updateOrderMeta()
S
68 2 6
Yoco\Gateway\Metadata::getOrderMeta()
S
75 2 4
Yoco\Core\Actions::setupActionLink()
S
65 2 8
Yoco\Gateway\Mode::isLiveMode()
S
79 2 3
Yoco\Helpers\Storage\Options::getOptions()
S
74 2 4
Yoco\Helpers\Storage\Options::getOption()
S
78 2 3
Yoco\Core\Environment::isDevelopmentEnvironment()
S
78 2 3
Yoco\Init::hasClass()
S
71 2 5
Yoco\Gateway\Mode::isTestMode()
S
79 2 3
Yoco\Installation\Installation::getGateway()
S
68 2 7
Yoco\Core\Constants::getCheckoutApiUrl()
S
71 2 6
Yoco\Gateway\Provider::getInstance()
S
68 2 7
Yoco\Installation\Request::send()
S
64 2 10
Yoco\Telemetry\Models\TelemetryObject::getWpVersion()
S
71 2 6
Yoco\Core\Singleton::get()
S
68 2 7
Yoco\Integrations\Webhook\SignatureValidator::validate()
S
64 2 9
Yoco\Integrations\Webhook\Vendors\WebhookSignatureValidator::__construct()
S
69 2 6
Yoco\Integrations\Webhook\Vendors\WebhookSignatureValidator::sign()
S
62 2 10
Yoco\Telemetry\Models\TelemetryObject::getHostUrl()
S
71 2 6
Yoco\Gateway\Credentials::hasLiveKeys()
S
78 2 3
Yoco\Gateway\Credentials::hasTestKeys()
S
78 2 3
Yoco\Integrations\Yoco\Webhooks\Events\WebhookEventsManager::getEventProcessor()
S
67 2 7
Yoco\Gateway\Credentials::getInstallationApiUrl()
S
69 2 7
Yoco\Integrations\Yoco\Webhooks\Events\WebhookEventsManager::getEventParser()
S
67 2 7
Yoco\Gateway\Credentials::getCheckoutApiUrl()
S
69 2 7
Yoco\Integrations\Yoco\Webhooks\Parsers\PaymentWebhookPayloadParser::validate()
S
63 2 10
Yoco\Integrations\Yoco\Webhooks\Parsers\RefundWebhookPayloadParser::validate()
S
63 2 10
Yoco\Gateway\Payment\Request::send()
S
64 2 10
Yoco\Integrations\Yoco\Webhooks\REST\Router::init()
S
69 2 7
Yoco\Helpers\MoneyFormatter::format()
S
61 1 12
Yoco\Integrations\Yoco\Webhooks\Events\WebhookEventsManager::__construct()
S
63 1 12
Yoco\Installation\Installation::getApiBearer()
S
80 1 3
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::getEventType()
S
82 1 3
Yoco\Init::bindPrivate()
S
79 1 3
Yoco\Gateway\Models\Payload::setSubtotalAmount()
S
77 1 4
Yoco\Gateway\Models\Payload::setLineItems()
S
77 1 4
Yoco\Gateway\Models\Payload::setExternalId()
S
77 1 4
Yoco\Gateway\Debug::isEnabled()
S
79 1 3
Yoco\Gateway\Payment\Request::__construct()
S
73 1 5
Yoco\Cron\CronScheduler::getTimestamp()
S
79 1 3
Yoco\Core\Dependencies::public()
S
77 1 4
Yoco\Gateway\Admin\Notices::__construct()
S
73 1 5
Yoco\Gateway\Models\Payload::setAmount()
S
77 1 4
Yoco\Gateway\Gateway::process_refund()
S
72 1 5
Yoco\Gateway\Processors\OptionsProcessor::__construct()
S
76 1 4
Yoco\Gateway\Gateway::update_admin_options()
S
82 1 3
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::setFailureReason()
S
81 1 3
Yoco\Gateway\Processors\OptionsProcessor::displaySuccessNotice()
S
78 1 3
Yoco\Gateway\Gateway::unset_fields()
S
76 1 4
Yoco\Integrations\Yoco\Webhooks\REST\Routes\Webhook::callback()
S
80 1 3
Yoco\Gateway\Processors\PaymentProcessor::__construct()
S
81 1 3
Yoco\Integrations\Yoco\Webhooks\Processors\WebhookProcessor::sendFailResponse()
S
69 1 8
Yoco\Integrations\Yoco\Webhooks\Controllers\WebhookController::__construct()
S
81 1 3
Yoco\Integrations\Yoco\Webhooks\REST\Rewrites::__construct()
S
79 1 3
Yoco\Cron\Job::__construct()
S
79 1 3
Yoco\Integrations\Yoco\Webhooks\REST\Rewrites::rewriteWebhookEndpoint()
S
79 1 3
Yoco\Gateway\Refund\Request::__construct()
S
73 1 5
Yoco\Gateway\Metadata::updateOrderCheckoutMeta()
S
74 1 4
Yoco\Gateway\Refund\Request::getArgs()
S
74 1 5
Yoco\Gateway\Refund\Request::getHeaders()
S
67 1 8
Yoco\Helpers\Admin\Notices::hasNoticeType()
S
79 1 3
Yoco\Helpers\Admin\Notices::getNoticeType()
S
80 1 3
Yoco\Gateway\Metadata::getOrderCheckoutUrl()
S
79 1 3
Yoco\Gateway\Metadata::updateOrderPaymentId()
S
79 1 3
Yoco\Gateway\Checkout\Availability::__construct()
S
68 1 7
Yoco\Gateway\Metadata::getOrderPaymentId()
S
79 1 3
Yoco\Helpers\Logger::logError()
S
79 1 3
Yoco\Helpers\Logger::logInfo()
S
79 1 3
Yoco\Gateway\Metadata::updateOrderRefundId()
S
78 1 3
Yoco\Gateway\Metadata::getOrderRefundId()
S
79 1 3
Yoco\Integrations\Yoco\Webhooks\Processors\WebhookProcessor::getOrderByCheckoutId()
S
80 1 3
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::hasCurrency()
S
80 1 3
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::setCurrency()
S
81 1 3
Yoco\Gateway\Processors\OptionsProcessor::displayFailureNotice()
S
78 1 3
Yoco\Helpers\Money\Currencies::getSupportedCurrencies()
S
70 1 8
Yoco\Helpers\Money\Currencies::getCurrentCurrency()
S
81 1 3
Yoco\Helpers\Money\Currencies::isCurrentCurrencySupported()
S
79 1 3
Yoco\Gateway\Mode::isEnabled()
S
79 1 3
Yoco\Helpers\Storage\Options::retrieve()
S
80 1 3
Yoco\Gateway\Mode::getMode()
S
80 1 3
Yoco\Core\Dependencies::admin()
S
77 1 4
Yoco\Helpers\Storage\Options::hasOption()
S
79 1 3
Yoco\Helpers\Validation\Validator::__construct()
S
80 1 3
Yoco\Core\Constants::hasInstallationApiUrl()
S
80 1 3
Yoco\Core\Singleton::__construct()
S
100 1 0
Yoco\Installation\Installation::getIdMetaKey()
S
79 1 3
Yoco\Gateway\Models\Metadata::setBillNote()
S
77 1 4
Yoco\Core\Setup::__construct()
S
79 1 3
Yoco\Installation\Request::getArgs()
S
71 1 6
Yoco\Gateway\Models\Metadata::setCustomerLastName()
S
77 1 4
Yoco\Integrations\Yoco\Webhooks\Parsers\RefundWebhookPayloadParser::__construct()
S
80 1 3
Yoco\Integrations\Yoco\Requests\Checkout::getOrderTotal()
S
79 1 3
Yoco\Integrations\Yoco\Webhooks\Controllers\WebhookController::handleGetRequest()
S
75 1 4
Yoco\Integrations\Yoco\Webhooks\Processors\WebhookProcessor::sendSuccessResponse()
S
81 1 3
Yoco\Helpers\Validation\ValidatorErrorBag::clearErrors()
S
81 1 3
Yoco\Gateway\Gateway::process_admin_options()
S
73 1 5
Yoco\Gateway\Models\Metadata::setCustomerFirstName()
S
77 1 4
Yoco\Gateway\Models\Payload::setCurrency()
S
77 1 4
Yoco\Integrations\Yoco\Requests\Checkout::buildLineItemPricingDetails()
S
65 1 9
Yoco\Gateway\Models\Payload::setFailureUrl()
S
77 1 4
Yoco\Gateway\Processors\PaymentProcessor::createSuccessRedirectResponse()
S
72 1 6
Yoco\Integrations\Yoco\Webhooks\Events\WebhookEventsManager::getEventsParsers()
S
82 1 3
Yoco\Gateway\Metadata::getOrderCheckoutId()
S
79 1 3
Yoco\Integrations\Yoco\Webhooks\REST\Routes\Webhook::permit()
S
80 1 3
Yoco\Integrations\Webhook\SignatureValidator::__construct()
S
80 1 3
Yoco\Core\Plugin::__construct()
S
79 1 3
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::getPaymentId()
S
82 1 3
Yoco\Integrations\Yoco\Requests\Checkout::__construct()
S
81 1 3
Yoco\Gateway\Payment\Request::getUrl()
S
81 1 3
Yoco\Integrations\Yoco\Requests\Checkout::buildLineItems()
S
69 1 8
Yoco\Gateway\Models\LineItemPricingDetails::toArray()
S
69 1 7
Yoco\Integrations\Yoco\Webhooks\REST\Router::__construct()
S
70 1 6
Yoco\Installation\Request::getHeaders()
S
69 1 7
Yoco\Gateway\Payment\Request::getHeaders()
S
67 1 8
Yoco\Gateway\Credentials::__construct()
S
81 1 3
Yoco\Integrations\Webhook\Vendors\WebhookSignatureValidator::fromRaw()
S
73 1 5
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::hasPaymentId()
S
80 1 3
Yoco\Gateway\Models\Payload::setMetadata()
S
77 1 4
Yoco\Integrations\Yoco\Requests\Checkout::getOrderTotalDiscount()
S
79 1 3
Yoco\Core\Singleton::__wakeup()
S
78 1 3
Yoco\Helpers\Validation\Validator::getErrorBag()
S
82 1 3
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::getFailureReason()
S
82 1 3
Yoco\Core\Plugin::activate()
S
82 1 3
Yoco\Gateway\Payment\Request::getArgs()
S
71 1 6
Yoco\Gateway\Models\LineItemPricingDetails::setDiscountAmount()
S
77 1 4
Yoco\Gateway\Settings::__construct()
S
75 1 4
Yoco\Gateway\Checkout\Method::__construct()
S
69 1 6
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::hasEventType()
S
80 1 3
Yoco\Gateway\Gateway::process_payment()
S
72 1 5
Yoco\Installation\Installation::getWebhookSecretMetaKey()
S
79 1 3
Yoco\Installation\Request::getBody()
S
72 1 5
Yoco\Installations\InstallationsManager::__construct()
S
74 1 4
Yoco\Gateway\Models\LineItem::setDisplayName()
S
77 1 4
Yoco\Integrations\Yoco\Webhooks\Controllers\WebhookController::handleUnallowedRequests()
S
68 1 8
Yoco\Gateway\Models\LineItem::setQuantity()
S
77 1 4
Yoco\Integrations\Yoco\Webhooks\Events\WebhookEventsManager::getEventsProcessors()
S
82 1 3
Yoco\Core\Dependencies::__construct()
S
72 1 5
Yoco\Installation\Installation::getApiUrl()
S
81 1 3
Yoco\Installation\Request::__construct()
S
76 1 4
Yoco\Helpers\Validation\ValidatorErrorBag::getErrors()
S
82 1 3
Yoco\Helpers\Validation\ValidatorErrorBag::pushError()
S
80 1 3
Yoco\Integrations\Yoco\Requests\Checkout::getOrderTotalShipping()
S
79 1 3
Yoco\Installation\Request::getUrl()
S
81 1 3
Yoco\Gateway\Provider::__construct()
S
79 1 3
Yoco\Integrations\Yoco\Webhooks\Parsers\PaymentWebhookPayloadParser::parse()
S
66 1 8
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::setCheckoutId()
S
81 1 3
Yoco\Integrations\Yoco\Webhooks\Parsers\PaymentWebhookPayloadParser::__construct()
S
80 1 3
Yoco\Gateway\Models\Metadata::setCustomerEmailAddress()
S
77 1 4
Yoco\Init::getClasses()
S
82 1 3
Yoco\Gateway\Provider::addPaymentMethod()
S
77 1 4
Yoco\Core\Dependencies::register()
S
67 1 7
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::hasCheckoutId()
S
80 1 3
Yoco\Gateway\Payment\Request::getBody()
S
70 1 6
Yoco\Core\Language::__construct()
S
79 1 3
Yoco\Installations\InstallationsManager::hasInstallationId()
S
79 1 3
Yoco\Gateway\Notes::__construct()
S
72 1 5
Yoco\Gateway\Models\LineItemPricingDetails::setTaxAmount()
S
77 1 4
Yoco\Integrations\Yoco\Requests\Checkout::getOrderCheckoutPaymentUrl()
S
69 1 8
Yoco\Helpers\Validation\ValidatorErrorBag::hasErrors()
S
80 1 3
Yoco\Gateway\Models\LineItemPricingDetails::setPrice()
S
77 1 4
Yoco\Core\Singleton::__clone()
S
91 1 2
Yoco\Integrations\Yoco\Requests\Checkout::getOrderTotalTax()
S
79 1 3
Yoco\Integrations\Yoco\Requests\Checkout::buildPayload()
S
65 1 10
Yoco\Integrations\Yoco\Requests\Checkout::getOrderSubtotal()
S
74 1 4
Yoco\Installation\Installation::getMode()
S
81 1 3
Yoco\Gateway\Models\LineItem::toArray()
S
69 1 7
Yoco\Gateway\Gateway::isEnabled()
S
79 1 3
Yoco\Gateway\Refund\Request::getCheckoutId()
S
80 1 3
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::setEventType()
S
81 1 3
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::hasFailureReason()
S
80 1 3
Yoco\Core\Constants::hasCheckoutApiUrl()
S
80 1 3
Yoco\Gateway\Checkout\Availability::isYocoGatewayAvailable()
S
79 1 3
Yoco\Gateway\Mode::__construct()
S
81 1 3
Yoco\Gateway\Metadata::__construct()
S
71 1 5
asset_path()
S
72 1 5
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::getCurrency()
S
82 1 3
Yoco\Gateway\Models\Payload::setCancelUrl()
S
77 1 4
Yoco\Gateway\Models\Payload::setTotalDiscount()
S
77 1 4
yoco_load()
S
77 1 4
Yoco\Gateway\Refund\Request::getUrl()
S
75 1 4
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::setPaymentId()
S
81 1 3
Yoco\Init::bindPublic()
S
79 1 3
yoco()
S
76 1 4
Yoco\Gateway\Debug::__construct()
S
81 1 3
Yoco\Gateway\Models\Payload::setTotalTaxAmount()
S
77 1 4
Yoco\Gateway\Models\Payload::setSuccessUrl()
S
77 1 4
Yoco\Gateway\Notes::addNote()
S
80 1 3
Yoco\Telemetry\Telemetry::getObject()
S
81 1 3
Yoco\Integrations\Yoco\Requests\Checkout::buildLineItem()
S
70 1 7
Yoco\Integrations\Yoco\Webhooks\Models\WebhookPayload::getCheckoutId()
S
82 1 3
Yoco\Init::getClass()
S
76 1 4
Yoco\Integrations\Yoco\Webhooks\REST\Routes\Webhook::register()
S
66 1 8
Yoco\Gateway\Models\Metadata::toArray()
S
67 1 8
Yoco\Installations\InstallationsManager::hasWebhookSecret()
S
79 1 3
Yoco\Integrations\Yoco\Webhooks\Events\WebhookEventsManager::getEvents()
S
80 1 3
Yoco\Gateway\Models\LineItem::setPricingDetails()
S
77 1 4
Yoco\Integrations\Webhook\Guard::verifySignature()
S
65 1 9