Showing 10,370 of 14,330 total issues
Function map_meta_cap
has a Cognitive Complexity of 215 (exceeds 5 allowed). Consider refactoring. Open
function map_meta_cap( $cap, $user_id, ...$args ) {
$caps = array();
switch ( $cap ) {
case 'remove_user':
- Read upRead up
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 template.php
has 1618 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Template WordPress Administration API.
*
* A Big Mess. Also some neat functions that are nicely written.
File kses.php
has 1601 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* kses 0.2.2 - HTML/XHTML filter that only allows some elements and attributes
* Copyright (C) 2002, 2003, 2005 Ulf Harnhammar
*
Function import_theme_starter_content
has a Cognitive Complexity of 209 (exceeds 5 allowed). Consider refactoring. Open
public function import_theme_starter_content( $starter_content = array() ) {
if ( empty( $starter_content ) ) {
$starter_content = get_theme_starter_content();
}
- Read upRead up
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 file.php
has 1539 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Filesystem API: Top-level functionality
*
* Functions for reading, writing, modifying, and deleting files on the file system.
File post.php
has 1533 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Post Administration API.
*
* @package WordPress
Function Uploader
has 810 lines of code (exceeds 25 allowed). Consider refactoring. Open
plupload.Uploader = function(options) {
/**
Fires when the current RunTime has been initialized.
@event Init
File module.audio.mp3.php
has 1494 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org> //
// available at https://github.com/JamesHeinrich/getID3 //
Function parse_microformats
has a Cognitive Complexity of 193 (exceeds 5 allowed). Consider refactoring. Open
private function parse_microformats(&$data, $url) {
$feed_title = '';
$feed_author = NULL;
$author_cache = array();
$items = array();
- Read upRead up
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 module.audio-video.asf.php
has 1481 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org> //
// available at https://github.com/JamesHeinrich/getID3 //
// or https://www.getid3.org //
File H.php
has 1480 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (class_exists('ParagonIE_Sodium_Core_Curve25519_H', false)) {
return;
}
File module.audio-video.matroska.php
has 1472 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org> //
// available at https://github.com/JamesHeinrich/getID3 //
Function update_core
has a Cognitive Complexity of 191 (exceeds 5 allowed). Consider refactoring. Open
function update_core( $from, $to ) {
global $wp_filesystem, $_old_files, $_old_requests_files, $_new_bundled_files, $wpdb;
if ( function_exists( 'set_time_limit' ) ) {
set_time_limit( 300 );
- Read upRead up
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 wp_insert_post
has a Cognitive Complexity of 191 (exceeds 5 allowed). Consider refactoring. Open
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) {
global $wpdb;
// Capture original pre-sanitized array for passing into filters.
$unsanitized_postarr = $postarr;
- Read upRead up
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 getid3.php
has 1446 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org> //
// available at https://github.com/JamesHeinrich/getID3 //
// or https://www.getid3.org //
File underscore.js
has 1445 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define('underscore', factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
var current = global._;
File customize-widgets.js
has 1435 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @output wp-admin/js/customize-widgets.js
*/
/* global _wpCustomizeWidgetsSettings */
Function 11
has a Cognitive Complexity of 186 (exceeds 5 allowed). Consider refactoring. Open
},{"16":16,"2":2,"26":26,"27":27,"5":5}],11:[function(_dereq_,module,exports){
'use strict';
var _document = _dereq_(2);
- Read upRead up
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 H.php
has 1431 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
if (class_exists('ParagonIE_Sodium_Core32_Curve25519_H', false)) {
return;
}
Function Analyze
has a Cognitive Complexity of 184 (exceeds 5 allowed). Consider refactoring. Open
public function Analyze()
{
$info = &$this->getid3->info;
// parse container
- Read upRead up
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"