Showing 10,370 of 14,330 total issues
File blocks.php
has 1174 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Functions related to registering and parsing blocks.
*
* @package WordPress
Function prepare_query
has a Cognitive Complexity of 148 (exceeds 5 allowed). Consider refactoring. Open
public function prepare_query( $query = array() ) {
global $wpdb, $wp_roles;
if ( empty( $this->query_vars ) || ! empty( $query ) ) {
$this->query_limit = null;
- 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 comment-template.php
has 1169 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Comment template functions
*
* These functions are meant to live inside of the WordPress loop.
Function SwitchEditors
has 599 lines of code (exceeds 25 allowed). Consider refactoring. Open
function SwitchEditors() {
var tinymce, $$,
exports = {};
function init() {
File class-wp-theme.php
has 1162 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WP_Theme Class
*
* @package WordPress
Function ajaxSubmit
has 596 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.ajaxSubmit = function(options, data, dataType, onSuccess) {
// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
if (!this.length) {
log('ajaxSubmit: skipping submit process - no element selected');
Method wp_default_scripts
has 595 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_default_scripts( $scripts ) {
$suffix = wp_scripts_get_suffix();
$dev_suffix = wp_scripts_get_suffix( 'dev' );
$guessurl = site_url();
Method map_meta_cap
has 594 lines of code (exceeds 25 allowed). Consider refactoring. Open
function map_meta_cap( $cap, $user_id, ...$args ) {
$caps = array();
switch ( $cap ) {
case 'remove_user':
File sortable.js
has 1151 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery UI Sortable 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
File meta-boxes.php
has 1151 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Administration Meta Boxes API.
*
* @package WordPress
File getid3.lib.php
has 1150 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 get_terms
has a Cognitive Complexity of 145 (exceeds 5 allowed). Consider refactoring. Open
public function get_terms() {
global $wpdb;
$this->parse_query( $this->query_vars );
$args = &$this->query_vars;
- 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 17
has 586 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"./Pseudos":12,"./SelectorPart":14}],17:[function(require,module,exports){
"use strict";
module.exports = TokenStream;
Function __construct
has a Cognitive Complexity of 144 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false, $curl_options = array())
{
if (class_exists('idna_convert'))
{
$idn = new idna_convert();
- 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
Method parseEBML
has 579 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function parseEBML(&$info) {
// http://www.matroska.org/technical/specs/index.html#EBMLBasics
$this->current_offset = $info['avdataoffset'];
while ($this->getEBMLelement($top_element, $info['avdataend'])) {
Function inline_edit
has a Cognitive Complexity of 142 (exceeds 5 allowed). Consider refactoring. Open
public function inline_edit() {
global $mode;
$screen = $this->screen;
- 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 get_comment_ids
has a Cognitive Complexity of 142 (exceeds 5 allowed). Consider refactoring. Open
protected function get_comment_ids() {
global $wpdb;
// Assemble clauses related to 'comment_approved'.
$approved_clauses = 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 class-wp-customize-widgets.php
has 1126 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Customize Widgets classes
*
* @package WordPress
Method redirect_canonical
has 575 lines of code (exceeds 25 allowed). Consider refactoring. Open
function redirect_canonical( $requested_url = null, $do_redirect = true ) {
global $wp_rewrite, $is_IIS, $wp_query, $wpdb, $wp;
if ( isset( $_SERVER['REQUEST_METHOD'] ) && ! in_array( strtoupper( $_SERVER['REQUEST_METHOD'] ), array( 'GET', 'HEAD' ), true ) ) {
return;
File nav-menu.php
has 1117 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Core Navigation Menu API
*
* @package WordPress