Showing 5,566 of 7,504 total issues
File Date.php
has 697 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* SimplePie
*
* A PHP-Based RSS and Atom Feed Framework.
File kses.php
has 696 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* HTML/XHTML filter that only allows some elements and attributes
*
* Added wp_ prefix to avoid conflicts with existing kses users
Function mw_editPost
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
function mw_editPost($args) {
$this->escape($args);
$post_ID = (int) $args[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 generate_rewrite_rules
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
function generate_rewrite_rules($permalink_structure, $ep_mask = EP_NONE, $paged = true, $feed = true, $forcomments = false, $walk_dirs = true, $endpoints = true) {
//build a regex to match the feed section of URLs, something like (feed|atom|rss|rss2)/?
$feedregex2 = '';
foreach ( (array) $this->feeds as $feed_name) {
$feedregex2 .= $feed_name . '|';
- 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 media-models.js
has 688 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global _wpMediaModelsL10n:false */
window.wp = window.wp || {};
(function($){
var Attachment, Attachments, Query, PostImage, compare, l10n, media;
Function map_meta_cap
has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring. Open
function map_meta_cap( $cap, $user_id ) {
$args = array_slice( func_get_args(), 2 );
$caps = array();
switch ( $cap ) {
- 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 getOnlyMPEGaudioInfoBruteForce
has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring. Open
public function getOnlyMPEGaudioInfoBruteForce() {
$MPEGaudioHeaderDecodeCache = array();
$MPEGaudioHeaderValidCache = array();
$MPEGaudioHeaderLengthCache = array();
$MPEGaudioVersionLookup = self::MPEGaudioVersionArray();
- 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_pages
has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring. Open
function &get_pages($args = '') {
global $wpdb;
$defaults = array(
'child_of' => 0, 'sort_order' => 'ASC',
- 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 embed
has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring. Open
function embed($options = '', $native = false)
{
// Set up defaults
$audio = '';
$video = '';
- 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 CopyTagsToComments
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
public static function CopyTagsToComments(&$ThisFileInfo) {
// Copy all entries from ['tags'] into common ['comments']
if (!empty($ThisFileInfo['tags'])) {
foreach ($ThisFileInfo['tags'] as $tagtype => $tagarray) {
- 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 dashboard.php
has 672 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Dashboard Widget Administration Panel API
*
* @package WordPress
Function search_theme_directories
has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring. Open
function search_theme_directories() {
global $wp_theme_directories, $wp_broken_themes;
if ( empty( $wp_theme_directories ) )
return false;
- 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 plugin.php
has 664 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Plugin Administration API
*
* @package WordPress
Method inline_edit
has 298 lines of code (exceeds 25 allowed). Consider refactoring. Open
function inline_edit() {
global $mode;
$screen = $this->screen;
Function wp_get_sidebars_widgets
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
function wp_get_sidebars_widgets($deprecated = true) {
global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
// If loading from front page, consult $_wp_sidebars_widgets rather than options
// to see if wp_convert_widget_settings() has made manipulations in memory.
- 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 save
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
function save($data)
{
if ($this->mysql)
{
$feed_id = "'" . mysql_real_escape_string($this->id) . "'";
- 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 widgets.php
has 657 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* API for creating dynamic sidebar without hardcoding functionality into
* themes. Includes both internal WordPress routines and theme use routines.
*
Function mw_newPost
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
function mw_newPost($args) {
$this->escape($args);
$blog_ID = (int) $args[0]; // we will support this in the near future
$username = $args[1];
- 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_link_pages
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
function wp_link_pages($args = '') {
$defaults = array(
'before' => '<p>' . __('Pages:'), 'after' => '</p>',
'link_before' => '', 'link_after' => '',
'next_or_number' => 'number', 'nextpagelink' => __('Next page'),
- 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 fetch_rss
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
function fetch_rss ($url) {
// initialize constants
init();
if ( !isset($url) ) {
- 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"