Showing 112 of 177 total issues
File SearchElastica.php
has 601 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace crewstyle\OlympusZeus\Plugins\Search;
use Elastica\Client;
Method wp_enqueue_media_olz
has 231 lines of code (exceeds 25 allowed). Consider refactoring. Open
static function wp_enqueue_media_olz($args = array())
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
Method getSocialNetworks
has 212 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSocialNetworks()
{
return array(
'twitter' => array(
'url' => OlympusZeus::translate('http://www.twitter.com/'),
File HookBackend.php
has 440 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace crewstyle\OlympusZeus\Core\Hook;
use crewstyle\OlympusZeus\OlympusZeus;
Method analysis
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function analysis($index, $posttypes, $terms)
{
//Check integrity
if (empty($index)) {
return null;
File PosttypeHook.php
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace crewstyle\OlympusZeus\Core\Posttype;
use crewstyle\OlympusZeus\OlympusZeus;
Function wp_enqueue_media_olz
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
static function wp_enqueue_media_olz($args = array())
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
- 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 getFontGoogle
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFontGoogle()
{
return array(
'sans_serif' => array(
'name' => 'sansserif',
File Social.php
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace crewstyle\OlympusZeus\Core\Field;
use crewstyle\OlympusZeus\OlympusZeus;
Function indexContents
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function indexContents($idxctn = true)
{
//Check page
if (!OLZ_ISADMIN) {
return 0;
- 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 hookCleanBodyClass
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function hookCleanBodyClass($classes, $class)
{
//Remove unecessary CSS classes generated by WORDPRESS on authors pages
if (isset($classes['author'])) {
//Get author
- 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 searchContents
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function searchContents()
{
//Return array
$return = array(
'query' => array(
Method tplVars
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function tplVars()
{
//Admin panel
if (!OLZ_ISADMIN) {
return;
Method hookSanitizeFilename
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function hookSanitizeFilename($filename)
{
//Invalid characters
$invalid = array(
'À'=>'A', 'Ã'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä€'=>'A', 'Ä‚'=>'A', 'Ȧ'=>'A', 'Ä'=>'A', 'Ả'=>'A', 'Ã…'=>'A', 'Ç'=>'A', 'È€'=>'A', 'È‚'=>'A', 'Ä„'=>'A', 'Ạ'=>'A', 'Ḁ'=>'A', 'Ầ'=>'A', 'Ấ'=>'A', 'Ẫ'=>'A', 'Ẩ'=>'A', 'Ằ'=>'A', 'Ắ'=>'A', 'Ẵ'=>'A', 'Ẳ'=>'A', 'Ç '=>'A', 'Çž'=>'A', 'Ǻ'=>'A', 'Ậ'=>'A', 'Ặ'=>'A',
Function analysis
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function analysis($index, $posttypes, $terms)
{
//Check integrity
if (empty($index)) {
return null;
- 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 indexContents
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function indexContents($idxctn = true)
{
//Check page
if (!OLZ_ISADMIN) {
return 0;
Function youtube
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
OlYoutube.prototype.youtube = function (){
var _ol = this;
//build wrapper
var $wrap = $(document.createElement('div')).css({
Method getModes
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getModes()
{
return array(
array(
'title' => OlympusZeus::translate('CSS'),
Method hookPermalinkMake
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function hookPermalinkMake($permalink, $post_id, $leavename)
{
if (!$post_id) {
return '';
}
Function hookFieldsDisplay
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function hookFieldsDisplay()
{
//Defintions
$slug = isset($_GET['post_type']) ? $_GET['post_type'] : '';
$contents = array();
- 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"