Showing 5,566 of 7,504 total issues
Function getLyrics3Data
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
public function getLyrics3Data($endoffset, $version, $length) {
// http://www.volweb.cz/str/tags.htm
$info = &$this->getid3->info;
- 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 49 (exceeds 5 allowed). Consider refactoring. Open
function request($url, $args = array()) {
$defaults = array(
'method' => 'GET', 'timeout' => 5,
'redirection' => 5, 'httpversion' => '1.0',
'blocking' => true,
- 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 wp_nav_menu_item_post_type_meta_box
has 189 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
global $_nav_menu_placeholder, $nav_menu_selected_id;
$post_type_name = $post_type['args']->name;
Method post_submit_meta_box
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
function post_submit_meta_box($post) {
global $action;
$post_type = $post->post_type;
$can_publish = current_user_can("publish_${post_type}s");
Method embed
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function embed($options = '', $native = false)
{
// Set up defaults
$audio = '';
$video = '';
Function edit_user
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function edit_user( $user_id = 0 ) {
global $current_user, $wp_roles, $wpdb;
if ( $user_id != 0 ) {
$update = true;
$user->ID = (int) $user_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
Function bulk_edit_posts
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function bulk_edit_posts( $post_data = null ) {
global $wpdb;
if ( empty($post_data) )
$post_data = &$_POST;
- 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 parseMETAdata
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function parseMETAdata() {
$info = &$this->getid3->info;
do {
$BlockOffset = $this->ftell();
$BlockHeader = $this->fread(4);
- 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_avatar
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
if ( ! get_option('show_avatars') )
return false;
if ( false === $alt)
- 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 paged_walk
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
/* sanity check */
if ( empty($elements) || $max_depth < -1 )
return '';
- 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 paged_walk
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
function paged_walk( $elements, $max_depth, $page_num, $per_page ) {
/* sanity check */
if ( empty($elements) || $max_depth < -1 )
return '';
- 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 request
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
function request($url, $args = array()) {
$defaults = array(
'method' => 'GET', 'timeout' => 5,
'redirection' => 5, 'httpversion' => '1.0',
'blocking' => true,
File plugins.php
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Plugins administration panel.
*
* @package WordPress
File category-template.php
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Category Template Tags and API.
*
* @package WordPress
Method network_step2
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
function network_step2( $errors = false ) {
global $wpdb;
$hostname = get_clean_basedomain();
$slashed_home = trailingslashit( get_option( 'home' ) );
Consider simplifying this complex logical expression. Open
if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width))
{
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
$this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width));
}
Consider simplifying this complex logical expression. Open
if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width))
{
// Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor
$this->data['enclosures'][] =& new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width);
}
File editimage.js
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
var tinymce = null, tinyMCEPopup, tinyMCE;
tinyMCEPopup = {
init: function() {
Function Coords
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Coords = function()/*{{{*/
{
var x1 = 0, y1 = 0, x2 = 0, y2 = 0, ox, oy;
function setPressed(pos)/*{{{*/
File ms.php
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Multisite administration functions.
*
* @package WordPress