Showing 449 of 644 total issues
Function KirkiSliderForm
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
const KirkiSliderForm = (props) => {
const { control, customizerSetting, choices } = props;
let trigger = "";
- Create a ticketCreate a ticket
File Repeater.php
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Customizer Control: repeater.
*
* @package kirki-framework/control-repeater
- Create a ticketCreate a ticket
Function 222
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
},{"40":40,"98":98}],222:[function(_dereq_,module,exports){
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = _dereq_(75);
var gOPD = _dereq_(77);
var getPrototypeOf = _dereq_(81);
- Read upRead up
- Create a ticketCreate a ticket
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 276
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
},{"126":126}],276:[function(_dereq_,module,exports){
var $iterators = _dereq_(140);
var getKeys = _dereq_(83);
var redefine = _dereq_(94);
var global = _dereq_(46);
- Read upRead up
- Create a ticketCreate a ticket
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 28
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"125":125,"15":15,"32":32,"36":36,"45":45,"61":61,"63":63,"70":70,"74":74,"75":75,"93":93,"99":99}],28:[function(_dereq_,module,exports){
'use strict';
var redefineAll = _dereq_(93);
var getWeak = _dereq_(70).getWeak;
var anObject = _dereq_(16);
- Create a ticketCreate a ticket
File Background.php
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Override field methods
*
* @package kirki-framework/control-background
- Create a ticketCreate a ticket
Method get_colors
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function get_colors( $context = 'primary' ) {
$colors = [
'primary' => [ '#ffffff', '#000000', '#f44336', '#e91e63', '#9c27b0', '#673ab7', '#3f51b5', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4caf50', '#8bc34a', '#cddc39', '#ffeb3b', '#ffc107', '#ff9800', '#ff5722', '#795548', '#9e9e9e', '#607d8b' ],
'red' => [ '#ffebee', '#ffcdd2', '#ef9a9a', '#e57373', '#ef5350', '#f44336', '#e53935', '#d32f2f', '#c62828', '#b71c1c', '#ff8a80', '#ff5252', '#ff1744', '#d50000' ],
'pink' => [ '#fce4ec', '#f8bbd0', '#f48fb1', '#f06292', '#ec407a', '#e91e63', '#d81b60', '#c2185b', '#ad1457', '#880e4f', '#ff80ab', '#ff4081', '#f50057', '#c51162' ],
- Create a ticketCreate a ticket
Function 112
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],112:[function(_dereq_,module,exports){
var ctx = _dereq_(32);
var invoke = _dereq_(52);
var html = _dereq_(49);
var cel = _dereq_(37);
- Create a ticketCreate a ticket
Function add_prefixes
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static function add_prefixes( $css ) {
if ( is_array( $css ) ) {
foreach ( $css as $media_query => $elements ) {
foreach ( $elements as $element => $style_array ) {
foreach ( $style_array as $property => $value ) {
- Read upRead up
- Create a ticketCreate a ticket
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 43
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],43:[function(_dereq_,module,exports){
'use strict';
_dereq_(224);
var redefine = _dereq_(94);
var hide = _dereq_(48);
- Create a ticketCreate a ticket
Function 29
has 72 lines of code (exceeds 25 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);
- Create a ticketCreate a ticket
Function KirkiReactColorfulInput
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
const KirkiReactColorfulInput = (props) => {
const { onChange, color = "" } = props;
const [value, setValue] = useState(() => color);
const handleChange = useCallback(
- Create a ticketCreate a ticket
Function initKirkiControl
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
initKirkiControl: function( control ) {
var limit, theNewRow, settingValue;
control = control || this;
// The current value set in Control Class (set in Kirki_Customize_Repeater_Control::to_json() function)
- Create a ticketCreate a ticket
Method __construct
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct( $manager, $id, $args = [] ) {
parent::__construct( $manager, $id, $args );
// Set up defaults for row labels.
- Create a ticketCreate a ticket
Method get_mode
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_mode( $color ) {
// Check if value is an array.
if ( is_array( $color ) ) {
// Does the array have an 'rgba' key?
- Create a ticketCreate a ticket
Function 33
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
},{"11":11}],33:[function(_dereq_,module,exports){
'use strict';
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var fails = _dereq_(42);
var getTime = Date.prototype.getTime;
- Read upRead up
- Create a ticketCreate a ticket
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 getNew
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function getNew( $property = '', $value = '' ) {
if ( in_array( $property, array( 'red', 'green', 'blue', 'alpha' ), true ) ) {
// Check if we're changing any of the rgba values.
$value = max( 0, min( 255, $value ) );
- Read upRead up
- Create a ticketCreate a ticket
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 evaluate
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
evaluate: function( value1, value2, operator, choice ) {
var found = false;
if ( choice && 'object' === typeof value2 ) {
value2 = value2[ choice ];
- Create a ticketCreate a ticket
Method sanitize
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function sanitize( $value ) {
if ( ! is_array( $value ) ) {
return [];
}
- Create a ticketCreate a ticket
repeater
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
wp.customize.controlConstructor.repeater = wp.customize.Control.extend( {
// When we're finished loading continue processing
ready: function() {
var control = this;
- Create a ticketCreate a ticket