Showing 5,566 of 7,504 total issues
Function get_admin_page_title
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
Open
function get_admin_page_title() {
global $title;
global $menu;
global $submenu;
global $pagenow;
- 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 kubrick_theme_page_head
has 202 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function kubrick_theme_page_head() {
?>
<script type="text/javascript" src="../wp-includes/js/colorpicker.js"></script>
<script type='text/javascript'>
// <![CDATA[
Method mw_editPost
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mw_editPost($args) {
$this->escape($args);
$post_ID = (int) $args[0];
Method redirect_canonical
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function redirect_canonical($requested_url=null, $do_redirect=true) {
global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) || is_preview() || is_robots() )
return;
Methods
has 56 functions (exceeds 20 allowed). Consider refactoring. Open
Open
Element.Methods = {
visible: function(element) {
return $(element).style.display != 'none';
},
Function tb_show
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
try {
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
jQuery("body","html").css({height: "100%", width: "100%"});
Methods
has 56 functions (exceeds 20 allowed). Consider refactoring. Open
Open
Element.Methods = {
visible: function(element) {
return $(element).style.display != 'none';
},
Method GuessEncoderOptions
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function GuessEncoderOptions() {
// shortcuts
$info = &$this->getid3->info;
if (!empty($info['mpeg']['audio'])) {
$thisfile_mpeg_audio = &$info['mpeg']['audio'];
File cropper.js
has 499 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
File media.js
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
tinyMCEPopup.requireLangPack();
var oldWidth, oldHeight, ed, url;
if (url = tinyMCEPopup.getParam("media_external_list_url"))
Method privExtractByRule
has 198 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
{
$v_result=1;
// ----- Magic quotes trick
Function force_balance_tags
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
Open
function force_balance_tags( $text ) {
$tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = '';
$single_tags = array('br', 'hr', 'img', 'input'); //Known single-entity/self-closing tags
$nestable_tags = array('blockquote', 'div', 'span'); //Tags that can be immediately nested within themselves
- 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-upgrader-skins.php
has 496 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* The User Interface "Skins" for the WordPress File Upgrader
*
* @package WordPress
File quicktags.dev.js
has 494 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// new edit toolbar used with permission
// by Alex King
// http://www.alexking.org/
var edButtons = new Array(), edLinks = new Array(), edOpenTags = new Array(), now = new Date(), datetime;
Method display_rows
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function display_rows() {
global $post;
add_filter( 'the_title','esc_html' );
$alt = '';
Method mw_newPost
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mw_newPost($args) {
$this->escape($args);
$blog_ID = (int) $args[0]; // we will support this in the near future
$username = $args[1];
Method mw_editPost
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mw_editPost($args) {
$this->escape($args);
$post_ID = (int) $args[0];
File wp-fullscreen.js
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* global deleteUserSetting, setUserSetting, switchEditors, tinymce, tinyMCEPreInit */
/**
* Distraction Free Writing
* (wp-fullscreen)
*
File Entities.php
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* SimplePie
*
* A PHP-Based RSS and Atom Feed Framework.
File press-this.php
has 492 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Press This Display and Handler.
*
* @package WordPress