ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if ($configs != false) {
            if ($module->getVar('hascomments') != 0) {
                include_once ICMS_ROOT_PATH.'/include/comment_constants.php' ;
                array_push($configs, array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMNOCOM' => XOOPS_COMMENT_APPROVENONE, '_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN)));
                array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0));
Severity: Major
Found in htdocs/install/modulesadmin.php and 1 other location - About 1 day to fix
htdocs/install/modulesadmin.php on lines 226..239

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 321.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function protector_postcommon has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
Open

function protector_postcommon() {
    global $xoopsModule;

    // configs writable check
    if (@$_SERVER['REQUEST_URI'] == '/admin.php' && !is_writable(dirname(__DIR__) . '/configs')) {

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

Similar blocks of code found in 4 locations. Consider refactoring.
Open

<?php
/**
 * rating definations
 *
 * @copyright http://www.impresscms.org/ The ImpressCMS Project
Severity: Major
Found in htdocs/modules/system/language/english/admin/rating.php and 3 other locations - About 1 day to fix
htdocs/modules/system/language/francais/admin/rating.php on lines 1..35
htdocs/modules/system/language/italiano/admin/rating.php on lines 1..35
htdocs/modules/system/language/nederlands/admin/rating.php on lines 1..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 319.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

<?php

/**
 * $Id: rating.php 159 2007-12-17 16:44:05Z malanciault $
 * Module: SmartContent
Severity: Major
Found in htdocs/modules/system/language/italiano/admin/rating.php and 3 other locations - About 1 day to fix
htdocs/modules/system/language/english/admin/rating.php on lines 1..34
htdocs/modules/system/language/francais/admin/rating.php on lines 1..35
htdocs/modules/system/language/nederlands/admin/rating.php on lines 1..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 319.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

<?php
/**
 * rating definations
 *
 * @copyright http://www.impresscms.org/ The ImpressCMS Project
Severity: Major
Found in htdocs/modules/system/language/francais/admin/rating.php and 3 other locations - About 1 day to fix
htdocs/modules/system/language/english/admin/rating.php on lines 1..34
htdocs/modules/system/language/italiano/admin/rating.php on lines 1..35
htdocs/modules/system/language/nederlands/admin/rating.php on lines 1..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 319.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

<?php
/**
 * rating definations
 *
 * @copyright http://www.impresscms.org/ The ImpressCMS Project
Severity: Major
Found in htdocs/modules/system/language/nederlands/admin/rating.php and 3 other locations - About 1 day to fix
htdocs/modules/system/language/english/admin/rating.php on lines 1..34
htdocs/modules/system/language/francais/admin/rating.php on lines 1..35
htdocs/modules/system/language/italiano/admin/rating.php on lines 1..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 319.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function queryFromFile has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
Open

    public function queryFromFile($sql_file_path) {
        $tables = array();

        if (!file_exists($sql_file_path)) {
            return false;
Severity: Minor
Found in htdocs/install/class/dbmanager.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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<?php
// $Id: blauer-fisch $
define("_CO_ICMS_AUTOTASKS_NAME", "任务名称");
define("_CO_ICMS_AUTOTASKS_NAME_DSC", "输入任务名称.");
define("_CO_ICMS_AUTOTASKS_CODE", "源代码");
Severity: Major
Found in htdocs/modules/system/language/schinese/admin/autotasks.php and 1 other location - About 1 day to fix
htdocs/modules/system/language/schinese/admin/userrank.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 314.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

<?php
// $Id: blauer-fisch $

######################## Added in 1.2 ###################################
define('_CO_ICMS_USERRANKS','用户排名设置');
Severity: Major
Found in htdocs/modules/system/language/schinese/admin/userrank.php and 1 other location - About 1 day to fix
htdocs/modules/system/language/schinese/admin/autotasks.php on lines 1..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 314.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

<?php
define("_CO_ICMS_AUTOTASKS_NAME", "Task Name");
define("_CO_ICMS_AUTOTASKS_NAME_DSC", "Enter the task name.");
define("_CO_ICMS_AUTOTASKS_CODE", "Source Code");
define("_CO_ICMS_AUTOTASKS_CODE_DSC", "Here you can write PHP code to be executed as a task.<p style='color:red'>Without &lt;?php and ?&gt;</p><br /><br />mainfile.php will already be included.<br />Use <i>icms::\$xoopsDB</i> to make use of the database object.");
Severity: Major
Found in htdocs/modules/system/language/english/admin/autotasks.php and 5 other locations - About 1 day to fix
htdocs/modules/system/language/english/admin/userrank.php on lines 1..32
htdocs/modules/system/language/francais/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/italiano/admin/autotasks.php on lines 1..32
htdocs/modules/system/language/nederlands/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/nederlands/admin/userrank.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 313.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

<?php
define("_CO_ICMS_AUTOTASKS_NAME", "Nome funzione");
define("_CO_ICMS_AUTOTASKS_NAME_DSC", "Inserisci il nome della funzione.");
define("_CO_ICMS_AUTOTASKS_CODE", "Codice sorgente");
define("_CO_ICMS_AUTOTASKS_CODE_DSC", "Qui puoi scrivere il codice PHP da eseguire come funzione.<p style='color:red'>SENZA &lt;?php e ?&gt;</p><br /><br />mainfile.php sar&agrave; gi&agrave; incluso.<br />Usa <i>global \$xoopsDB</i> per fare uso di oggetti del database.");
Severity: Major
Found in htdocs/modules/system/language/italiano/admin/autotasks.php and 5 other locations - About 1 day to fix
htdocs/modules/system/language/english/admin/autotasks.php on lines 1..33
htdocs/modules/system/language/english/admin/userrank.php on lines 1..32
htdocs/modules/system/language/francais/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/nederlands/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/nederlands/admin/userrank.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 313.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

<?php
// $Id: userrank.php 9538 2009-11-13 18:59:32Z pesianstranger $

######################## Added in 1.2 ###################################
define('_CO_ICMS_USERRANKS','User Ranks Settings');
Severity: Major
Found in htdocs/modules/system/language/english/admin/userrank.php and 5 other locations - About 1 day to fix
htdocs/modules/system/language/english/admin/autotasks.php on lines 1..33
htdocs/modules/system/language/francais/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/italiano/admin/autotasks.php on lines 1..32
htdocs/modules/system/language/nederlands/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/nederlands/admin/userrank.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 313.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

<?php
// $Id: userrank.php 9536 2009-11-13 18:59:32Z pesianstranger $

######################## Added in 1.2 ###################################
define('_CO_ICMS_USERRANKS','Gebruikerspositie instellingen');
htdocs/modules/system/language/english/admin/autotasks.php on lines 1..33
htdocs/modules/system/language/english/admin/userrank.php on lines 1..32
htdocs/modules/system/language/francais/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/italiano/admin/autotasks.php on lines 1..32
htdocs/modules/system/language/nederlands/admin/autotasks.php on lines 1..26

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 313.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

<?php
define('_CO_ICMS_AUTOTASKS_NAME', 'Taaknaam');
define('_CO_ICMS_AUTOTASKS_NAME_DSC', 'Voeg de naam van de taak in.');
define('_CO_ICMS_AUTOTASKS_CODE', 'Bron code');
define('_CO_ICMS_AUTOTASKS_CODE_DSC', 'Hier kunt u PHP code schrijven om te worden uitgevoerd als een taak.<br /><br />mainfile.php zal al worden ingevoegd.<br />Gebruik <i>global $xoopsDB</i> om gebruik te maken het database object.');
htdocs/modules/system/language/english/admin/autotasks.php on lines 1..33
htdocs/modules/system/language/english/admin/userrank.php on lines 1..32
htdocs/modules/system/language/francais/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/italiano/admin/autotasks.php on lines 1..32
htdocs/modules/system/language/nederlands/admin/userrank.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 313.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

<?php
define('_CO_ICMS_AUTOTASKS_NAME', 'Nom de tâche');
define('_CO_ICMS_AUTOTASKS_NAME_DSC', 'Entrer le nom de la tâche');
define('_CO_ICMS_AUTOTASKS_CODE', 'Code source');
define('_CO_ICMS_AUTOTASKS_CODE_DSC', 'Ecrivez le code PHP qui doit etre execute comme une tache. <br /><br />mainfile.php sera deja insere.<br />Utiliser <i>global $xoopsDB</i> pour utiliser l\' objet DB.');
Severity: Major
Found in htdocs/modules/system/language/francais/admin/autotasks.php and 5 other locations - About 1 day to fix
htdocs/modules/system/language/english/admin/autotasks.php on lines 1..33
htdocs/modules/system/language/english/admin/userrank.php on lines 1..32
htdocs/modules/system/language/italiano/admin/autotasks.php on lines 1..32
htdocs/modules/system/language/nederlands/admin/autotasks.php on lines 1..26
htdocs/modules/system/language/nederlands/admin/userrank.php on lines 1..32

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 313.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if (isset($comment_config['callback']['update']) && trim($comment_config['callback']['update']) != '') {
            $skip = false;
            if (!function_exists($comment_config['callback']['update'])) {
                if (isset($comment_config['callbackFile'])) {
                    $callbackfile = trim($comment_config['callbackFile']);
Severity: Major
Found in htdocs/include/comment_delete.php and 1 other location - About 1 day to fix
htdocs/include/comment_delete.php on lines 253..276

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 312.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if (isset($comment_config['callback']['update']) && trim($comment_config['callback']['update']) != '') {
            $skip = false;
            if (!function_exists($comment_config['callback']['update'])) {
                if (isset($comment_config['callbackFile'])) {
                    $callbackfile = trim($comment_config['callbackFile']);
Severity: Major
Found in htdocs/include/comment_delete.php and 1 other location - About 1 day to fix
htdocs/include/comment_delete.php on lines 137..159

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 312.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File preferences.php has 632 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
// $Id: preferences.php 12227 2013-07-19 08:07:21Z fiammy $
// %%%%%% Admin Module Name AdminGroup %%%%%
// dont change
if (!defined('_AM_DBUPDATED')) {
Severity: Major
Found in htdocs/modules/system/language/english/admin/preferences.php - About 1 day to fix

    File preferences.php has 629 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    // 08/2008 Updated and adapted for ImpressCMS by evoc - webmaster of www.impresscms.it
    // Published by ImpressCMS Italian Official Support Site - www.impresscms.it
    // Updated by evoc - webmaster of ImpressCMS
    // Updated by Ianez - Xoops Italia Staff
    Severity: Major
    Found in htdocs/modules/system/language/italiano/admin/preferences.php - About 1 day to fix

      File preferences.php has 623 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      // $Id: blauer-fisch $
      //%%%%%%    Admin Module Name  AdminGroup     %%%%%
      // dont change
      if (!defined('_AM_DBUPDATED')) {define("_AM_DBUPDATED","数据库更新成功!");}
      Severity: Major
      Found in htdocs/modules/system/language/schinese/admin/preferences.php - About 1 day to fix
        Severity
        Category
        Status
        Source
        Language