Showing 5,566 of 7,504 total issues
Function addWidget
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
addWidget: function( widgetId ) {
var self = this, controlHtml, $widget, controlType = 'widget_form', $control, controlConstructor,
parsedWidgetId = parseWidgetId( widgetId ),
widgetNumber = parsedWidgetId.number,
widgetIdBase = parsedWidgetId.id_base,
Method display_plugins_table
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
function display_plugins_table($plugins, $page = 1, $totalpages = 1){
$type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
$term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';
$plugins_allowedtags = array('a' => array('href' => array(),'title' => array(), 'target' => array()),
Method analyze
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function analyze($filename) {
try {
if (!$this->openfile($filename)) {
return $this->info;
}
prototype
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
Test.Unit.Assertions.prototype = {
initialize: function() {
this.assertions = 0;
this.failures = 0;
this.errors = 0;
SimplePie_Misc
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class SimplePie_Misc
{
public static function time_hms($seconds)
{
$time = '';
Function $ViewDirective
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $ViewDirective( $state, $injector, $uiViewScroll, $interpolate) {
function getService() {
return ($injector.has) ? function(service) {
return $injector.has(service) ? $injector.get(service) : null;
File class-wp-admin-bar.php
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* The WordPress Toolbar
*
* @since 3.1.0
Function Initialization
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Initialization = (function () {
function Initialization(snippet) {
snippet.queue = snippet.queue || [];
var config = snippet.config || {};
if (config && !config.instrumentationKey) {
Function _SessionManager
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
var _SessionManager = (function () {
function _SessionManager(config, sessionHandler) {
if (!config) {
config = {};
}
Method Data
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Data($msg_data) {
$this->error = null; # so no confusion is caused
if(!$this->connected()) {
$this->error = array(
File ParticipantCommandHandlers.cs
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
using Edument.CQRS;
using Events.Participant;
using MBACNationals.Participant.Commands;
using MBACNationals.ReadModels;
using System;
File TournamentQueries.cs
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
using Edument.CQRS;
using Events.Tournament;
using System;
using System.Collections.Generic;
using System.Linq;
File plugin.js
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global tinymce */
/**
* WordPress View plugin.
*/
tinymce.PluginManager.add( 'wpview', function( editor ) {
Function nth
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
nth: function(nodes, formula, root, reverse, ofType) {
if (nodes.length == 0) return [];
if (formula == 'even') formula = '2n+0';
if (formula == 'odd') formula = '2n+1';
var h = Selector.handlers, results = [], indexed = [], m;
- 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 updateStyle
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
updateStyle : function() {
var dom = tinyMCEPopup.dom, st, v, cls, oldcls, rep, f = document.forms[0];
if (tinyMCEPopup.editor.settings.inline_styles) {
st = tinyMCEPopup.dom.parseStyle(this.styleVal);
- 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 setOptions
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
setOptions: function(options) {
this.options = Object.extend({
choices: 10,
partialSearch: true,
partialChars: 2,
- 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 nth
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
nth: function(nodes, formula, root, reverse, ofType) {
if (nodes.length == 0) return [];
if (formula == 'even') formula = '2n+0';
if (formula == 'odd') formula = '2n+1';
var h = Selector.handlers, results = [], indexed = [], m;
- 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_row_actions
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function _get_row_actions( $post, $att_title ) {
$actions = array();
if ( $this->detached ) {
if ( current_user_can( 'edit_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"
Further reading
Function mdel
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function mdel($remote, $continious=false) {
$list=$this->rawlist($remote, "-la");
if($list===false) {
$this->PushError("mdel","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
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 _wp_ajax_add_hierarchical_term
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function _wp_ajax_add_hierarchical_term() {
$action = $_POST['action'];
$taxonomy = get_taxonomy(substr($action, 4));
check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name );
if ( !current_user_can( $taxonomy->cap->edit_terms ) )
- 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"