Showing 5,566 of 7,504 total issues
File load.php
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* These functions are needed to load WordPress.
*
* @internal This file must be parsable by PHP4.
Function animate
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
animate : (function() {
// detect transition
var transition = (function( style ) {
var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
Function animate
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
animate : (function() {
// detect transition
var transition = (function( style ) {
var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
Method single_row
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
function single_row( $item ) {
global $status, $page, $s, $totals;
list( $plugin_file, $plugin_data ) = $item;
$context = $status;
Method remove_accents
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
function remove_accents($string) {
if ( !preg_match('/[\x80-\xff]/', $string) )
return $string;
if (seems_utf8($string)) {
Method pingback_ping
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
function pingback_ping($args) {
global $wpdb;
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'pingback.ping' );
Function ColorPicker
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ColorPicker() {
var windowMode = false;
// Create a new PopupWindow object
if (arguments.length==0) {
var divname = "colorPickerDiv";
Method parseMETAdata
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parseMETAdata() {
$info = &$this->getid3->info;
do {
$BlockOffset = $this->ftell();
$BlockHeader = $this->fread(4);
Function dw_getRandomImage
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function dw_getRandomImage(rObj, bReturn) {
var imgAr = rObj.images; if (!imgAr ) return '';
var num = Math.floor( Math.random() * imgAr.length );
var imgStr = ''; var imgFile = imgAr[ num ];
rObj.num = num; // hold which img selected (for ctr)
- 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 dw_getRandomImage
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function dw_getRandomImage(rObj, bReturn) {
var imgAr = rObj.images; if (!imgAr ) return '';
var num = Math.floor( Math.random() * imgAr.length );
var imgStr = ''; var imgFile = imgAr[ num ];
rObj.num = num; // hold which img selected (for ctr)
- 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 generatePreview
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function generatePreview(c) {
var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
p.innerHTML = '<!-- x --->';
- 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 make_site_theme_from_default
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function make_site_theme_from_default($theme_name, $template) {
$site_dir = WP_CONTENT_DIR . "/themes/$template";
$default_dir = WP_CONTENT_DIR . '/themes/default';
// Copy files from the default theme to the site theme.
- 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 add_meta_box
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default', $callback_args=null) {
global $wp_meta_boxes;
if ( !isset($wp_meta_boxes) )
$wp_meta_boxes = 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
Function wp_ajax_replyto_comment
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function wp_ajax_replyto_comment( $action ) {
global $wp_list_table, $wpdb;
if ( empty( $action ) )
$action = 'replyto-comment';
- 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 pingback_ping
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function pingback_ping($args) {
global $wpdb;
do_action('xmlrpc_call', 'pingback.ping');
- 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 auto_check_update_meta
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public static function auto_check_update_meta( $id, $comment ) {
// failsafe for old WP versions
if ( !function_exists('add_comment_meta') )
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
Function mw_getPost
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function mw_getPost($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 wp_kses_attr
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols) {
# Is there a closing XHTML slash at the end of the attributes?
$xhtml_slash = '';
if (preg_match('%\s/\s*$%', $attr))
- 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 load
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function load()
{
if ($this->mysql && ($query = mysql_query('SELECT `items`, `data` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && ($row = mysql_fetch_row($query)))
{
$data = unserialize($row[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 absolutize
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function absolutize($base, $relative)
{
$relative = (string) $relative;
if ($relative !== '')
{
- 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"