Showing 25 of 72 total issues
File bootstrap.js
has 1412 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ===================================================
* bootstrap-transition.js v2.1.1
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
Function query
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function query($and = false, $where = false, $limit = true)
{
$query = ' ';
if($and && count($this->settings['filters']))
- 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
Consider simplifying this complex logical expression. Open
if (!$IS_CLIENTAREA && isset($_REQUEST['modsubpage'])
&& in_array($PAGE, $available_pages)
&& in_array($_REQUEST['modsubpage'], $available_pages)
&& file_exists(ADDON_DIR . DS . 'pages' . DS . $PAGE . DS . $_REQUEST['modsubpage'] . '.php')
) {
Consider simplifying this complex logical expression. Open
if (!$IS_CLIENTAREA && isset($_REQUEST['modsubpage'])
&& in_array($PAGE, $available_pages)
&& in_array($_REQUEST['modsubpage'], $available_pages)
&& file_exists(ADDON_DIR . DS . 'views' . DS . $PAGE . DS . $_REQUEST['modsubpage'] . '.php')
) {
Method query
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function query($and = false, $where = false, $limit = true)
{
$query = ' ';
if($and && count($this->settings['filters']))
Function kwspamexperts_getLang
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function kwspamexperts_getLang($params){
global $CONFIG;
if(!empty($_SESSION['Language']))
$language = strtolower($_SESSION['Language']);
else if(isset($params['clientsdetails']['language']) && strtolower($params['clientsdetails']['language'])!='')
- 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 show
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
, show: function () {
var $tip
, inside
, pos
, actualWidth
Function hide_pass_in_clientarea_spamexperts
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function hide_pass_in_clientarea_spamexperts() {
global $smarty;
if (!defined('Smarty::SMARTY_VERSION')) {
if($smarty->_tpl_vars['filename'] == 'clientarea' &&
- 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 spamexpertsreseller_getLang
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function spamexpertsreseller_getLang($params){
global $CONFIG;
if(!empty($_SESSION['Language']))
$language = strtolower($_SESSION['Language']);
else if(isset($params['clientsdetails']['language']) && strtolower($params['clientsdetails']['language'])!='')
- 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 hide_pass_in_clientarea_spamexperts
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function hide_pass_in_clientarea_spamexperts() {
global $smarty;
if (!defined('Smarty::SMARTY_VERSION')) {
if($smarty->_tpl_vars['filename'] == 'clientarea' &&
- 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 spamexpertsreseller_getLang
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function spamexpertsreseller_getLang($params){
global $CONFIG;
if(!empty($_SESSION['Language']))
$language = strtolower($_SESSION['Language']);
else if(isset($params['clientsdetails']['language']) && strtolower($params['clientsdetails']['language'])!='')
- 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
Method kwspamexperts_ConfigOptions
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function kwspamexperts_ConfigOptions() {
$configarray = array(
"ProductType" => array(
"Type" => "dropdown",
"Options" => "Incoming,Outgoing,Both",
Function slide
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
Method spamexpertsreseller_ConfigOptions
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function spamexpertsreseller_ConfigOptions()
{
$configarray = array(
"SpampanelURL" => array(
"Type" => "text",
Method spamexpertsreseller_ConfigOptions
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function spamexpertsreseller_ConfigOptions()
{
$configarray = array(
"SpampanelURL" => array(
"Type" => "text",
Method kwspamexperts_CreateAccount
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function kwspamexperts_CreateAccount($params)
{
$api = new kwspamexperts_api($params);
$domain = !empty($params["customfields"]["Domain"]) ? $params["customfields"]["Domain"] : $params['domain'];
$password = !empty($params['password']) ? $params["password"] : createServerPassword();
Method kwspamexperts_management
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function kwspamexperts_management($params){
global $CONFIG;
$lang = kwspamexperts_getLang($params);
$api = new kwspamexperts_api($params);
$page = (isset($_GET['page']) ? addslashes($_GET['page']) : 'mainsite');
Method spamexpertsreseller_management
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function spamexpertsreseller_management($params){
// phpcs:ignore PHPCS_SecurityAudit.BadFunctions.EasyRFI.WarnEasyRFI
include_once(__DIR__.DIRECTORY_SEPARATOR.'class.connection.php');
global $CONFIG;
$lang = spamexpertsreseller_getLang($params);
Method spamexpertsreseller_management
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function spamexpertsreseller_management($params){
// phpcs:ignore PHPCS_SecurityAudit.BadFunctions.EasyRFI.WarnEasyRFI
include_once(__DIR__.DIRECTORY_SEPARATOR.'class.connection.php');
global $CONFIG;
$lang = spamexpertsreseller_getLang($params);
Function show
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
, show: function () {
var that = this
, e = $.Event('show')
this.$element.trigger(e)