aristath/kirki

View on GitHub

Showing 449 of 644 total issues

File wp-polyfill.js has 5582 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
(function (global){
"use strict";

_dereq_(2);
Severity: Major
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 2 wks to fix

Function 280 has a Cognitive Complexity of 306 (exceeds 5 allowed). Consider refactoring.
Open

},{"276":276,"277":277,"278":278,"30":30}],280:[function(_dereq_,module,exports){
/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 6 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

`` has 280 functions (exceeds 20 allowed). Consider refactoring.
Open

(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
(function (global){
"use strict";

_dereq_(2);
Severity: Major
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 5 days to fix

Function 120 has a Cognitive Complexity of 154 (exceeds 5 allowed). Consider refactoring.
Open

},{"57":57}],120:[function(_dereq_,module,exports){
'use strict';
if (_dereq_(36)) {
  var LIBRARY = _dereq_(65);
  var global = _dereq_(46);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 3 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function 366 has a Cognitive Complexity of 128 (exceeds 5 allowed). Consider refactoring.
Open

/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);

Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/hooks.js - About 2 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File example.php has 1022 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * An example file demonstrating how to add all controls.
 *
 * @package     Kirki
Severity: Major
Found in example.php - About 2 days to fix

Function 280 has 481 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"276":276,"277":277,"278":278,"30":30}],280:[function(_dereq_,module,exports){
/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
Severity: Major
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 2 days to fix

Function 120 has 417 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"57":57}],120:[function(_dereq_,module,exports){
'use strict';
if (_dereq_(36)) {
  var LIBRARY = _dereq_(65);
  var global = _dereq_(46);
Severity: Major
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 2 days to fix

Function 29 has a Cognitive Complexity of 94 (exceeds 5 allowed). Consider refactoring.
Open

},{"125":125,"15":15,"16":16,"20":20,"45":45,"47":47,"57":57,"70":70,"93":93}],29:[function(_dereq_,module,exports){
'use strict';
var global = _dereq_(46);
var $export = _dereq_(40);
var redefine = _dereq_(94);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function 254 has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
Open

},{"110":110}],254:[function(_dereq_,module,exports){
'use strict';
// ECMAScript 6 symbols shim
var global = _dereq_(46);
var has = _dereq_(47);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function 121 has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
Open

},{"103":103,"113":113,"114":114,"115":115,"117":117,"118":118,"119":119,"121":121,"122":122,"123":123,"128":128,"129":129,"140":140,"15":15,"17":17,"18":18,"19":19,"20":20,"25":25,"32":32,"36":36,"40":40,"42":42,"46":46,"47":47,"48":48,"54":54,"57":57,"62":62,"64":64,"65":65,"74":74,"75":75,"77":77,"79":79,"81":81,"92":92,"93":93,"99":99}],121:[function(_dereq_,module,exports){
'use strict';
var global = _dereq_(46);
var DESCRIPTORS = _dereq_(36);
var LIBRARY = _dereq_(65);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function 376 has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
Open

/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);

Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/i18n.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function parse_output has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring.
Open

    protected function parse_output() {
        foreach ( $this->output as $output ) {
            $skip = false;

            // Apply any sanitization callbacks defined.
Severity: Minor
Found in packages/kirki-framework/module-css/src/CSS/Output.php - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function 27 has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
Open

},{}],27:[function(_dereq_,module,exports){
'use strict';
var dP = _dereq_(75).f;
var create = _dereq_(74);
var redefineAll = _dereq_(93);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function 376 has 261 lines of code (exceeds 25 allowed). Consider refactoring.
Open

/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);

Severity: Major
Found in packages/kirki-framework/compatibility/src/scripts/i18n.js - About 1 day to fix

Function 208 has 261 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"40":40,"89":89}],208:[function(_dereq_,module,exports){
'use strict';
var LIBRARY = _dereq_(65);
var global = _dereq_(46);
var ctx = _dereq_(32);
Severity: Major
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 day to fix

Function 208 has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

},{"40":40,"89":89}],208:[function(_dereq_,module,exports){
'use strict';
var LIBRARY = _dereq_(65);
var global = _dereq_(46);
var ctx = _dereq_(32);
Severity: Minor
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function 121 has 250 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"103":103,"113":113,"114":114,"115":115,"117":117,"118":118,"119":119,"121":121,"122":122,"123":123,"128":128,"129":129,"140":140,"15":15,"17":17,"18":18,"19":19,"20":20,"25":25,"32":32,"36":36,"40":40,"42":42,"46":46,"47":47,"48":48,"54":54,"57":57,"62":62,"64":64,"65":65,"74":74,"75":75,"77":77,"79":79,"81":81,"92":92,"93":93,"99":99}],121:[function(_dereq_,module,exports){
'use strict';
var global = _dereq_(46);
var DESCRIPTORS = _dereq_(36);
var LIBRARY = _dereq_(65);
Severity: Major
Found in packages/kirki-framework/compatibility/src/scripts/wp-polyfill.js - About 1 day to fix

File i18n.js has 568 lines of code (exceeds 250 allowed). Consider refactoring.
Open

this["wp"] = this["wp"] || {}; this["wp"]["i18n"] =
/******/ (function(modules) { // webpackBootstrap
/******/     // The module cache
/******/     var installedModules = {};
/******/
Severity: Major
Found in packages/kirki-framework/compatibility/src/scripts/i18n.js - About 1 day to fix

Function sanitize has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
Open

    public function sanitize( $value ) {

        // is the value formatted as a string?
        if ( is_string( $value ) ) {
            $value = rawurldecode( $value );
Severity: Minor
Found in packages/kirki-framework/control-repeater/src/Field/Repeater.php - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Severity
Category
Status
Source
Language