Showing 1,798 of 3,223 total issues
Function parse
has 225 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function(d, precision) {
"use strict";
var date,
date_array,
time_array,
Function expandRng
has 225 lines of code (exceeds 25 allowed). Consider refactoring. Open
function expandRng(rng, format, remove) {
var sibling, lastIdx, leaf, endPoint,
startContainer = rng.startContainer,
startOffset = rng.startOffset,
endContainer = rng.endContainer,
File common.js
has 539 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global setUserSetting, ajaxurl, commonL10n, alert, confirm, toggleWithKeyboard, pagenow */
var showNotice, adminMenu, columns, validateForm, screenMeta;
( function( $, window, undefined ) {
// Removed in 3.3.
// (perhaps) needed for back-compat
Function buildDataCells
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
buildDataCells: function(d) {
var data_obj = VMM.Timeline.DataObj.data_template_obj,
is_valid = false,
cellnames = ["timeline"],
list = [],
- 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 open
has 218 lines of code (exceeds 25 allowed). Consider refactoring. Open
open : function(f, p) {
var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
f = f || {};
p = p || {};
File media-models.js
has 526 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global _wpMediaModelsL10n:false */
window.wp = window.wp || {};
(function($){
var Attachment, Attachments, Query, compare, l10n, media;
Function moveStates
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
moveStates : function(to_form, field) {
var data = this.data, editor = this.editor,
mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
defaultStates = {
Function itself
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
var itself = function (s, o, g) {
var a, i, k, x;
var optionKeys;
var newOptionObj = {};
Function ForceBlocks
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
tinymce.ForceBlocks = function(editor) {
var settings = editor.settings, dom = editor.dom, selection = editor.selection, blockElements = editor.schema.getBlockElements();
function addRootBlocks() {
var node = selection.getStart(), rootNode = editor.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF, wrapped, isInEditorDocument;
- 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 d3_locale_timeFormat
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
function d3_locale_timeFormat(locale) {
var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;
function d3_time_format(template) {
var n = template.length;
function format(date) {
Function chord
has 210 lines of code (exceeds 25 allowed). Consider refactoring. Open
chord: function(options) {
var buildChord, container, init, log, retrieveChordData, settings;
settings = {
dataEndpoint: void 0,
mainColor: '#777',
Function force
has 207 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.layout.force = function() {
var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges;
function repulse(node) {
return function(quad, x1, _, x2) {
if (quad.point !== node) {
File editor_plugin_src.js
has 511 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
File media-editor.js
has 509 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global getUserSetting, tinymce, QTags, wpActiveEditor */
// WordPress, TinyMCE, and Media
// -----------------------------
(function($){
Function Slide
has 204 lines of code (exceeds 25 allowed). Consider refactoring. Open
VMM.Slider.Slide = function(d, _parent) {
var $media, $text, $slide, $wrap, element, c,
data = d,
slide = {},
Function DragSlider
has 202 lines of code (exceeds 25 allowed). Consider refactoring. Open
VMM.DragSlider = function() {
var drag = {
element: "",
element_move: "",
constraint: "",
Function applyList
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
applyList: function(targetListType, oppositeListType) {
var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions,
selectedBlocks = ed.selection.getSelectedBlocks();
function cleanupBr(e) {
File wp-langs-en.js
has 499 lines of code (exceeds 250 allowed). Consider refactoring. Open
tinyMCE.addI18n({en:{
common:{
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
apply:"Apply",
insert:"Insert",
Function SaxParser
has 199 lines of code (exceeds 25 allowed). Consider refactoring. Open
tinymce.html.SaxParser = function(settings, schema) {
var self = this, noop = function() {};
settings = settings || {};
self.schema = schema = schema || new tinymce.html.Schema();
Function updateAction
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
function updateAction() {
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
if (!AutoValidator.validate(formObj)) {
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
- 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"