Showing 760 of 1,529 total issues
Function Routes
has 1585 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Routes(pb){
return [
{
method: 'get',
path: '/media/*',
Function RequestHandlerModule
has a Cognitive Complexity of 281 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function RequestHandlerModule(pb) {
//pb dependencies
var AsyncEventEmitter = pb.AsyncEventEmitter;
- 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 LocalizationModule
has a Cognitive Complexity of 239 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function LocalizationModule(pb) {
//pb dependencies
var config = pb.config;
- 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 CustomObjectServiceModule
has a Cognitive Complexity of 219 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function CustomObjectServiceModule(pb) {
/**
* Provides a service to do the heavy lifting of retrieving custom objects with
* the ability to eagerly fetch the related objects.
- 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 RequestHandlerModule
has 894 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function RequestHandlerModule(pb) {
//pb dependencies
var AsyncEventEmitter = pb.AsyncEventEmitter;
File routes.js
has 1589 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
Copyright (C) 2016 PencilBlue, LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Function PluginServiceModule
has 815 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function PluginServiceModule(pb) {
/**
* @private
* @static
Function CustomObjectServiceModule
has 728 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function CustomObjectServiceModule(pb) {
/**
* Provides a service to do the heavy lifting of retrieving custom objects with
* the ability to eagerly fetch the related objects.
Function exports
has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(pb) {
/**
* Retrieves articles and pages
* @deprecated
- 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 markdown.js
has 1073 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Released under MIT license
// Copyright (c) 2009-2010 Dominic Baggott
// Copyright (c) 2009-2010 Ash Berlin
// Copyright (c) 2011 Christoph Dorn <christoph@christophdorn.com> (http://www.christophdorn.com)
File jquery.fileupload.js
has 1069 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery File Upload Plugin 5.39.0
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
Function SectionServiceModule
has 533 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function SectionServiceModule(pb) {
/**
* Service for managing the site's navigation
* @class SectionService
Function LocalizationModule
has 529 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function LocalizationModule(pb) {
//pb dependencies
var config = pb.config;
Function PluginServiceModule
has a Cognitive Complexity of 129 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function PluginServiceModule(pb) {
/**
* @private
* @static
- 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 WPXMLParseServiceModule
has 512 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function WPXMLParseServiceModule(pb) {
//pb dependencies
var util = pb.util;
var xml2js = pb.NpmPluginDependencyService.require('wp_import', 'xml2js');
Function exports
has 501 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(pb) {
/**
* A templating engine that provides the ability to read in file snippets and
* call back for data based on the flags in the template file. The instance
Function exports
has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(pb) {
/**
* A templating engine that provides the ability to read in file snippets and
* call back for data based on the flags in the template file. The instance
- 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 exports
has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (pb) {
//pb dependencies
var util = pb.util;
var BaseObjectService = pb.BaseObjectService;
- 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 DAOModule
has 456 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function DAOModule(pb) {
/**
* Controlls the data model
*
Function AdminNavigationModule
has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function AdminNavigationModule(pb) {
//PB dependencies
var SecurityService = pb.SecurityService;
var GLOBAL_SITE = pb.SiteService.GLOBAL_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"