Showing 5,566 of 7,504 total issues
Function parse_request
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
function parse_request($extra_query_vars = '') {
global $wp_rewrite;
$this->query_vars = array();
$taxonomy_query_vars = 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 wordpress.php
has 646 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress Importer
*
* @package WordPress
Function get_media_item
has a Cognitive Complexity of 72 (exceeds 5 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];
- 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 showDialog
has 282 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showDialog(imageList) {
var win, data = {}, dom = editor.dom, imgElm = editor.selection.getNode();
var width, height, imageListCtrl, classListCtrl;
function buildValues(listSettingName, dataItemName, defaultItems) {
File theme.php
has 636 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Theme, template, and stylesheet functions.
*
* @package WordPress
Function post_submit_meta_box
has a Cognitive Complexity of 71 (exceeds 5 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");
- 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 Analyze
has 281 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Analyze() {
$info = &$this->getid3->info;
// Overall tag structure:
// +-----------------------------+
Method init
has 279 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init()
{
// Check absolute bare minimum requirements.
if ((function_exists('version_compare') && version_compare(PHP_VERSION, '4.3.0', '<')) || !extension_loaded('xml') || !extension_loaded('pcre'))
{
File rss.php
has 629 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* MagpieRSS: a simple RSS integration tool
*
* A compiled file for RSS syndication
Function update
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
update : function() {
var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html;
tinyMCEPopup.restoreSelection();
el = ed.selection.getNode();
- 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 70 (exceeds 5 allowed). Consider refactoring. Open
public 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 save
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
public function save($data)
{
if ($this->mysql === null)
{
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 comment-template.php
has 628 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Comment template functions
*
* These functions are meant to live inside of the WordPress loop.
Method akismet_caught
has 275 lines of code (exceeds 25 allowed). Consider refactoring. Open
function akismet_caught() {
global $wpdb, $comment, $akismet_caught, $akismet_nonce;
akismet_recheck_queue();
if (isset($_POST['submit']) && 'recover' == $_POST['action'] && ! empty($_POST['not_spam'])) {
File media-audiovideo.js
has 621 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global _wpMediaViewsL10n, _wpmejsSettings, MediaElementPlayer */
(function($, _, Backbone) {
var media = wp.media,
baseSettings = {},
File media.php
has 620 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* WordPress API for media display.
*
* @package WordPress
File deprecated.php
has 620 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Deprecated functions from past WordPress versions. You shouldn't use these
* globals and functions and look for the alternatives instead. The functions
* and globals will be removed in a later version.
Function display_rows
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
function display_rows() {
global $mode;
$alt = '';
$super_admins = get_super_admins();
- 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 kubrick_add_theme_page
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
function kubrick_add_theme_page() {
if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) {
if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) {
check_admin_referer('kubrick-header');
if ( isset($_REQUEST['njform']) ) {
- 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_default_scripts
has 268 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wp_default_scripts( &$scripts ) {
if ( !$guessurl = site_url() )
$guessurl = wp_guess_url();