imagecms/ImageCMS

View on GitHub

Showing 1,388 of 1,858 total issues

File jquery.contextMenu.js has 1221 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery contextMenu - Plugin for simple contextMenu handling
 *
 * Version: git-master
 *

File BannerImage.php has 1182 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace xbanners\models\Base;

use \Exception;
Severity: Major
Found in application/modules/xbanners/models/Base/BannerImage.php - About 3 days to fix

File Banners.php has 1118 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace xbanners\models\Base;

use \Exception;
Severity: Major
Found in application/modules/xbanners/models/Base/Banners.php - About 2 days to fix

File Route.php has 1037 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace core\models\Base;

use \Exception;
Severity: Major
Found in application/modules/core/models/Base/Route.php - About 2 days to fix

File cycle.js has 1001 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2009 M. Alsup
 * Version: 2.71 (11-AUG-2009)
Severity: Major
Found in application/modules/xbanners/assets/js/cycle.js - About 2 days to fix

File admin.php has 918 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

use CMSFactory\assetManager;
use core\src\CoreFactory;

Severity: Major
Found in application/modules/menu/admin.php - About 2 days to fix

File jquery.fancybox-1.3.4.js has 844 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * FancyBox - jQuery Plugin
 * Simple and fancy lightbox alternative
 *
 * Examples and documentation at: http://fancybox.net
Severity: Major
Found in application/modules/gallery/assets/js/jquery.fancybox-1.3.4.js - About 2 days to fix

File admin.php has 821 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
Severity: Major
Found in application/modules/gallery/admin.php - About 1 day to fix

Function edit_item has a Cognitive Complexity of 96 (exceeds 5 allowed). Consider refactoring.
Open

    public function edit_item($item_id) {

        if (!$this->input->post()) {
            $item = $this->db
                ->where('menus_data.id', $item_id)
Severity: Minor
Found in application/modules/menu/admin.php - About 1 day to fix

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

BannerImage has 98 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class BannerImage extends PropelBaseModelClass implements ActiveRecordInterface
{
    /**
     * TableMap class name
     */
Severity: Major
Found in application/modules/xbanners/models/Base/BannerImage.php - About 1 day to fix

File BannerImageI18n.php has 764 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace xbanners\models\Base;

use \Exception;
Severity: Major
Found in application/modules/xbanners/models/Base/BannerImageI18n.php - About 1 day to fix

File Permitions.php has 759 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
Severity: Major
Found in application/libraries/Permitions.php - About 1 day to fix

File DX_Auth.php has 750 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
Severity: Major
Found in application/libraries/DX_Auth.php - About 1 day to fix

Banners has 91 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class Banners extends PropelBaseModelClass implements ActiveRecordInterface
{
    /**
     * TableMap class name
     */
Severity: Major
Found in application/modules/xbanners/models/Base/Banners.php - About 1 day to fix

File pages.php has 732 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

use CMSFactory\Events;
use core\models\Route;

Severity: Major
Found in application/modules/admin/pages.php - About 1 day to fix

BaseEvents has 88 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class BaseEvents
{

    /**
     * @var array
Severity: Major
Found in application/modules/CMSFactory/BaseEvents.php - About 1 day to fix

File Products.php has 716 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace exchange\classes;

use CI;
Severity: Major
Found in application/modules/exchange/classes/Products.php - About 1 day to fix

Route has 86 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class Route extends PropelBaseModelClass implements ActiveRecordInterface
{
    /**
     * TableMap class name
     */
Severity: Major
Found in application/modules/core/models/Base/Route.php - About 1 day to fix

Function processProducts1 has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
Open

    protected function processProducts1() {

        $propertiesDataUpdate = [];
        $productPropDTDel = [];

Severity: Minor
Found in application/modules/exchange/classes/Products.php - About 1 day to fix

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 ProductsImport.php has 652 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace import_export\classes;

use CI_DB_active_record;
Severity: Major
Found in application/modules/import_export/classes/ProductsImport.php - About 1 day to fix
Severity
Category
Status
Source
Language