Showing 5,566 of 7,504 total issues
WP_Customize_Widgets
has 47 functions (exceeds 20 allowed). Consider refactoring. Open
final class WP_Customize_Widgets {
/**
* WP_Customize_Manager instance.
*
File deprecated.php
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Deprecated admin functions from past WordPress versions. You shouldn't use these
* functions and look for the alternatives instead. The functions will be removed
* in a later version.
Method _insert_post
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _insert_post( $user, $content_struct ) {
$defaults = array( 'post_status' => 'draft', 'post_type' => 'post', 'post_author' => 0,
'post_password' => '', 'post_excerpt' => '', 'post_content' => '', 'post_title' => '' );
$post_data = wp_parse_args( $content_struct, $defaults );
Method privDeleteByRule
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
function privDeleteByRule(&$p_result_list, &$p_options)
{
$v_result=1;
$v_list_detail = array();
Function network_step2
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function network_step2( $errors = false ) {
global $wpdb;
$hostname = get_clean_basedomain();
$slashed_home = trailingslashit( get_option( 'home' ) );
- 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 dispatch
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function dispatch()
{
if (empty ($_GET['step']))
$step = 0;
- 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 _shiftBoundaries
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function _shiftBoundaries($lines, &$changed, $other_changed)
{
$i = 0;
$j = 0;
- 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 request
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function request( $url, $args = array() ) {
global $wp_version;
$defaults = array(
'method' => 'GET',
- 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_load_translations_early
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function wp_load_translations_early() {
global $text_direction, $wp_locale;
static $loaded = false;
if ( $loaded )
- 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 contingentController
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
var contingentController = function ($scope, $http, $q, $location, modalFactory, dataService) {
var url = $location.absUrl();
var lastSlash = url.lastIndexOf('/');
var province = url.slice(lastSlash + 1);
var year = url.slice(lastSlash - 4, lastSlash);
Function QTags
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
var QTags = function(name, id, container, disabled) {
var t = this, cont = document.getElementById(container), i, tag, tb, html, sel;
t.Buttons = [];
t.Links = [];
File wplink.js
has 433 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global ajaxurl, tinymce, wpLinkL10n, setUserSetting, wpActiveEditor */
var wpLink;
( function( $ ) {
var inputs = {}, rivers = {}, editor, searchTimer, River, Query;
File mce-view.js
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global tinymce, MediaElementPlayer, WPPlaylistView */
/**
* Note: this API is "experimental" meaning that it will probably change
* in the next few releases based on feedback from 3.9.0.
* If you decide to use it, please follow the development closely.
Method get_media_item
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_media_item( $attachment_id, $args = null ) {
global $redir_tab;
if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) )
$thumb_url = $thumb_url[0];
Consider simplifying this complex logical expression. Open
if (
// Invalid sequences
!$valid
// Non-shortest form sequences are invalid
|| $length > 1 && $character <= 0x7F
File wp-db.php
has 430 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress DB Class
*
* Original code from {@link http://php.justinvincent.com Justin Vincent (justin@visunet.ie)}
Method wp_nav_menu_item_taxonomy_meta_box
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
global $nav_menu_selected_id;
$taxonomy_name = $taxonomy['args']->name;
// paginate browsing for large numbers of objects
Method get_calendar
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_calendar($initial = true) {
global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;
$cache = array();
$key = md5( $m . $monthnum . $year );
File theme.js
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* theme.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
File class-json.php
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Converts to and from JSON format.
*