Showing 5,566 of 7,504 total issues
Method editor_js
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function editor_js() {
global $tinymce_version, $concatenate_scripts, $compress_scripts;
/**
* Filter "tiny_mce_version" is deprecated
File handlers.js
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global plupload, pluploadL10n, ajaxurl, post_id, wpUploaderInit, deleteUserSetting, setUserSetting, getUserSetting, shortform */
var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init;
// progress and success handlers for media multi uploads
function fileQueued(fileObj) {
Function $Resolve
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $Resolve( $q, $injector) {
var VISIT_IN_PROGRESS = 1,
VISIT_DONE = 2,
NOTHING = {},
Function touch
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
touch: function() {
var startX,
startY,
offset,
cwidth,
File heartbeat.js
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Heartbeat API
*
* Heartbeat is a simple server polling API that sends XHR requests to
* the server every 15 - 60 seconds and triggers events (or callbacks) upon
Function updateWidget
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateWidget: function( args ) {
var self = this, instanceOverride, completeCallback, $widgetRoot, $widgetContent,
updateNumber, params, data, $inputs, processing, jqxhr, isChanged;
args = $.extend( {
Method parse_request
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse_request($extra_query_vars = '') {
global $wp_rewrite;
/**
* Filter whether to parse the request.
Function addMethods
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Element.addMethods = function(methods) {
var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
if (!methods) {
Object.extend(Form, Form.Methods);
- 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 addMethods
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Element.addMethods = function(methods) {
var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
if (!methods) {
Object.extend(Form, Form.Methods);
- 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 screen_meta
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function screen_meta($screen) {
global $wp_meta_boxes, $_wp_contextual_help;
$screen = str_replace('.php', '', $screen);
$screen = str_replace('-new', '', $screen);
- 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 prepare_items
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function prepare_items() {
global $s, $mode, $wpdb;
$current_site = get_current_site();
- 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 media_upload_library_form
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function media_upload_library_form($errors) {
global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
media_upload_header();
- 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 install_package
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function install_package($args = array()) {
global $wp_filesystem;
$defaults = array( 'source' => '', 'destination' => '', //Please always pass these
'clear_destination' => false, 'clear_working' => false,
'hook_extra' => 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_insert_link
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function wp_insert_link( $linkdata, $wp_error = false ) {
global $wpdb, $current_user;
$defaults = array( 'link_id' => 0, 'link_name' => '', 'link_url' => '', 'link_rating' => 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 import_posts
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function import_posts() {
global $wpdb, $current_user;
set_magic_quotes_runtime(0);
$importdata = file($this->file); // Read the file into an 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 pingback_ping
has a Cognitive Complexity of 33 (exceeds 5 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' );
- 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 readData
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function readData() {
$this->skipBits(8);
$this->skipBits(8);
$profile = $this->getBits(8); // read profile
$this->skipBits(16);
- 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 getHashdata
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function getHashdata($algorithm) {
switch ($algorithm) {
case 'md5':
case 'sha1':
break;
- 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 _getTransport
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function &_getTransport( $args = array() ) {
static $working_transport, $blocking_transport, $nonblocking_transport;
if ( is_null($working_transport) ) {
if ( true === WP_Http_ExtHttp::test($args) ) {
- 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_save_post_revision
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function wp_save_post_revision( $post_id ) {
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
return;
if ( ! $post = get_post( $post_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"