custom_media_upload_tab_name accesses the super-global variable $_GET. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
custom_media_upload_tab_name accesses the super-global variable $_GET. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
render_admin_page accesses the super-global variable $_GET. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
admin_process accesses the super-global variable $_GET. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
custom_media_uploader_tabs accesses the super-global variable $_GET. Open
public function custom_media_uploader_tabs($strings)
{
//update strings
if (\Xmf\Request::hasVar('page', 'GET') && 'metaslider' == $_GET['page']) {
$strings['insertMediaTitle'] = __('Image', 'metaslider');
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
admin_process accesses the super-global variable $_REQUEST. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
custom_media_upload_tab_name accesses the super-global variable $_GET. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
custom_media_upload_tab_name accesses the super-global variable $_GET. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Method render_admin_page
has 535 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
File ml-slider.php
has 1047 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* Plugin Name: Meta Slider
* Plugin URI: http://www.metaslider.com
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
Function build_settings_rows
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- 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 render_admin_page
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- 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
MetaSliderPlugin
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class MetaSliderPlugin
{
/** Current Slider **/
public $slider = null;
The class MetaSliderPlugin has an overall complexity of 123 which is very high. The configured complexity threshold is 50. Open
class MetaSliderPlugin
{
/** Current Slider **/
public $slider = null;
- Exclude checks
The class MetaSliderPlugin has 28 non-getter- and setter-methods. Consider refactoring MetaSliderPlugin to keep number of methods under 25. Open
class MetaSliderPlugin
{
/** Current Slider **/
public $slider = null;
- Read upRead up
- Exclude checks
TooManyMethods
Since: 0.1
A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
The default was changed from 10 to 25 in PHPMD 2.3.
Example
Source https://phpmd.org/rules/codesize.html#toomanymethods
The class MetaSliderPlugin has 21 public methods. Consider refactoring MetaSliderPlugin to keep number of public methods under 10. Open
class MetaSliderPlugin
{
/** Current Slider **/
public $slider = null;
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
Method build_settings_rows
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
Method get_easing_options
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function get_easing_options()
{
$options = [
'linear',
'swing',
Method admin_footer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function admin_footer()
{
global $pagenow;
// Only run in post/page creation and edit screens
Function custom_media_upload_tab_name
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- 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 admin_process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
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
Function admin_footer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function admin_footer()
{
global $pagenow;
// Only run in post/page creation and edit screens
- 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
Avoid too many return
statements within this method. Open
return new MetaFlexSlider($id, $shortcode_settings);
Function custom_media_uploader_tabs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function custom_media_uploader_tabs($strings)
{
//update strings
if (\Xmf\Request::hasVar('page', 'GET') && 'metaslider' == $_GET['page']) {
$strings['insertMediaTitle'] = __('Image', 'metaslider');
- 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
The method build_settings_rows() has 111 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Exclude checks
The class MetaSliderPlugin has 1348 lines of code. Current threshold is 1000. Avoid really long classes. Open
class MetaSliderPlugin
{
/** Current Slider **/
public $slider = null;
- Exclude checks
The method build_settings_rows() has an NPath complexity of 20737. The configured NPath complexity threshold is 200. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method render_admin_page() has 558 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Exclude checks
The method render_admin_page() has an NPath complexity of 15728640. The configured NPath complexity threshold is 200. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method render_admin_page() has a Cyclomatic Complexity of 32. The configured cyclomatic complexity threshold is 10. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method build_settings_rows() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Avoid using undefined variables such as '$return' which will lead to PHP notices. Open
return $return;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$return' which will lead to PHP notices. Open
$return[$option] = [
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Missing class import via use statement (line '97', column '28'). Open
$systemCheck = new MetaSliderSystemCheck();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '418', column '28'). Open
return new MetaResponsiveSlider($id, $shortcode_settings);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '415', column '28'). Open
return new MetaNivoSlider($id, $shortcode_settings);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '421', column '28'). Open
return new MetaFlexSlider($id, $shortcode_settings);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '409', column '28'). Open
return new MetaCoinSlider($id, $shortcode_settings);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '540', column '26'). Open
$the_query = new WP_Query($args);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '481', column '29'). Open
$slider = new MetaSlider($id, []);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '412', column '28'). Open
return new MetaFlexSlider($id, $shortcode_settings);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '151', column '22'). Open
$image = new MetaImageSlide();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '576', column '26'). Open
$the_query = new WP_Query($args);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class '\Xmf\Request' in method 'admin_process'. Open
if (\Xmf\Request::hasVar('id', 'REQUEST')) {
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method render_admin_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo "<h3 class='nav-tab-wrapper'>";
foreach ($tabs as $tab) {
if ($tab['active']) {
echo "<div class='nav-tab nav-tab-active'><input type='text' name='title' value='" . $tab['title'] . "' onfocus='this.style.width = ((this.value.length + 1) * 9) + \"px\"' ></div>";
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method render_admin_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo "<h3 class='nav-tab-wrapper'>";
echo "<a href='{$add_url}' id='create_new_tab' class='nav-tab'>+</a>";
echo "<div class='bubble'>" . __('Create your first slideshow') . '</div>';
echo '</h3>';
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\Xmf\Request' in method 'custom_media_uploader_tabs'. Open
if (\Xmf\Request::hasVar('page', 'GET') && 'metaslider' == $_GET['page']) {
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method admin_footer uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
_e('No slideshows found', 'metaslider');
} ?>
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\Xmf\Request' in method 'render_admin_page'. Open
if (\Xmf\Request::hasVar('add', 'GET') && 'true' === $_GET['add']) {
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Xmf\Request' in method 'admin_process'. Open
if (\Xmf\Request::hasVar('add', 'GET')) {
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Xmf\Request' in method 'admin_process'. Open
if (\Xmf\Request::hasVar('delete', 'GET')) {
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method render_admin_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
echo "<a href='?page=metaslider&id={$tab['id']}' class='nav-tab'>" . $tab['title'] . '</a>';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused local variables such as '$image'. Open
$image = new MetaImageSlide();
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused private methods such as 'compare_elems'. Open
private function compare_elems($elem1, $elem2)
{
return $elem1['priority'] > $elem2['priority'];
}
- Read upRead up
- Exclude checks
UnusedPrivateMethod
Since: 0.2
Unused Private Method detects when a private method is declared but is unused.
Example
class Something
{
private function foo() {} // unused
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod
Similar blocks of code found in 2 locations. Consider refactoring. Open
'sph' => [
'priority' => 120,
'type' => 'number',
'size' => 3,
'min' => 0,
- Read upRead up
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 111.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
'spw' => [
'priority' => 110,
'type' => 'number',
'size' => 3,
'min' => 0,
- Read upRead up
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 111.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
'width' => [
'priority' => 10,
'type' => 'number',
'size' => 3,
'min' => 0,
- Read upRead up
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 99.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
'sDelay' => [
'priority' => 170,
'type' => 'number',
'size' => 3,
'min' => 0,
- Read upRead up
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 99.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
'animationSpeed' => [
'priority' => 90,
'type' => 'number',
'size' => 3,
'min' => 0,
- Read upRead up
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 99.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
'titleSpeed' => [
'priority' => 190,
'type' => 'number',
'size' => 3,
'min' => 0,
- Read upRead up
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 99.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
'delay' => [
'priority' => 80,
'type' => 'number',
'size' => 3,
'min' => 500,
- Read upRead up
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 99.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
'height' => [
'priority' => 20,
'type' => 'number',
'size' => 3,
'min' => 0,
- Read upRead up
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 99.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
'slices' => [
'priority' => 100,
'type' => 'number',
'size' => 3,
'min' => 0,
- Read upRead up
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 99.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class MetaSliderPlugin
- Exclude checks
Avoid variables with short names like $id. Configured minimum length is 3. Open
public function set_slider($id, $shortcode_settings = [])
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
private function create_slider($type, $id, $shortcode_settings)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $shortcode_settings is not named in camelCase. Open
public function set_slider($id, $shortcode_settings = [])
{
$type = 'flex';
$settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $sort_key is not named in camelCase. Open
private function all_meta_sliders($sort_key = 'date')
{
$sliders = false;
// list the tabs
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $id. Configured minimum length is 3. Open
$slider = new MetaSlider($id, []);
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $shortcode_settings is not named in camelCase. Open
private function create_slider($type, $id, $shortcode_settings)
{
switch ($type) {
case ('coin'):
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $id. Configured minimum length is 3. Open
private function delete_slider($id)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 22 and the first side effect is on line 19. Open
<?php
- Exclude checks
Method name "MetaSliderPlugin::register_admin_styles" is not in camel caps format Open
public function register_admin_styles()
- Exclude checks
Method name "MetaSliderPlugin::admin_process" is not in camel caps format Open
public function admin_process()
- Exclude checks
The DEFAULT body must start on the line following the statement Open
default:
- Exclude checks
Method name "MetaSliderPlugin::register_admin_menu" is not in camel caps format Open
public function register_admin_menu()
- Exclude checks
Method name "MetaSliderPlugin::register_shortcode" is not in camel caps format Open
public function register_shortcode($atts)
- Exclude checks
Method name "MetaSliderPlugin::find_slider" is not in camel caps format Open
private function find_slider($orderby, $order)
- Exclude checks
The CASE body must start on the line following the statement Open
case ('flex'):
- Exclude checks
Method name "MetaSliderPlugin::create_slider" is not in camel caps format Open
private function create_slider($type, $id, $shortcode_settings)
- Exclude checks
The CASE body must start on the line following the statement Open
case ('nivo'):
- Exclude checks
Method name "MetaSliderPlugin::custom_media_uploader_tabs" is not in camel caps format Open
public function custom_media_uploader_tabs($strings)
- Exclude checks
Method name "MetaSliderPlugin::compare_elems" is not in camel caps format Open
private function compare_elems($elem1, $elem2)
- Exclude checks
Method name "MetaSliderPlugin::upgrade_to_pro" is not in camel caps format Open
public function upgrade_to_pro($links)
- Exclude checks
Method name "MetaSliderPlugin::load_plugin_textdomain" is not in camel caps format Open
public function load_plugin_textdomain()
- Exclude checks
Method name "MetaSliderPlugin::register_admin_scripts" is not in camel caps format Open
public function register_admin_scripts()
- Exclude checks
The CASE body must start on the line following the statement Open
case ('coin'):
- Exclude checks
Method name "MetaSliderPlugin::set_slider" is not in camel caps format Open
public function set_slider($id, $shortcode_settings = [])
- Exclude checks
Method name "MetaSliderPlugin::system_check" is not in camel caps format Open
public function system_check()
- Exclude checks
Method name "MetaSliderPlugin::register_slide_types" is not in camel caps format Open
private function register_slide_types()
- Exclude checks
Method name "MetaSliderPlugin::go_pro_cta" is not in camel caps format Open
public function go_pro_cta()
- Exclude checks
Method name "MetaSliderPlugin::help_tab" is not in camel caps format Open
public function help_tab()
- Exclude checks
The CASE body must start on the line following the statement Open
case ('responsive'):
- Exclude checks
Method name "MetaSliderPlugin::delete_slider" is not in camel caps format Open
private function delete_slider($id)
- Exclude checks
Method name "MetaSliderPlugin::custom_media_upload_tab_name" is not in camel caps format Open
public function custom_media_upload_tab_name($tabs)
- Exclude checks
Method name "MetaSliderPlugin::build_settings_rows" is not in camel caps format Open
public function build_settings_rows($aFields)
- Exclude checks
Method name "MetaSliderPlugin::register_taxonomy" is not in camel caps format Open
public function register_taxonomy()
- Exclude checks
Method name "MetaSliderPlugin::register_post_type" is not in camel caps format Open
public function register_post_type()
- Exclude checks
Method name "MetaSliderPlugin::add_slider" is not in camel caps format Open
private function add_slider()
- Exclude checks
Method name "MetaSliderPlugin::all_meta_sliders" is not in camel caps format Open
private function all_meta_sliders($sort_key = 'date')
- Exclude checks
Method name "MetaSliderPlugin::metaslider_pro_tab" is not in camel caps format Open
public function metaslider_pro_tab()
- Exclude checks
Method name "MetaSliderPlugin::get_easing_options" is not in camel caps format Open
private function get_easing_options()
- Exclude checks
Method name "MetaSliderPlugin::admin_footer" is not in camel caps format Open
public function admin_footer()
- Exclude checks
Method name "MetaSliderPlugin::insert_metaslider_button" is not in camel caps format Open
public function insert_metaslider_button($context)
- Exclude checks
Method name "MetaSliderPlugin::render_admin_page" is not in camel caps format Open
public function render_admin_page()
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
wp_enqueue_style('metaslider-admin-styles', METASLIDER_ASSETS_URL . 'metaslider/admin.css', false, METASLIDER_VERSION);
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
wp_enqueue_style('metaslider-colorbox-styles', METASLIDER_ASSETS_URL . 'colorbox/colorbox.css', false, METASLIDER_VERSION);
- Exclude checks
Line exceeds 120 characters; contains 215 characters Open
$return .= "<tr><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='checkbox' name='settings[{$id}]' {$row['checked']} >";
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
wp_enqueue_style('metaslider-admin-styles', METASLIDER_ASSETS_URL . 'metaslider/admin.css', false, METASLIDER_VERSION);
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
$return .= "<tr class='{$row['type']}'><td colspan='2' class='divider'><b>{$row['value']}</b></td></tr>";
- Exclude checks
Line exceeds 120 characters; contains 143 characters Open
$return .= "<input class='select-slider' id='{$k}' rel='{$k}' type='radio' name='settings[type]' value='{$k}' {$checked} >
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
wp_enqueue_style('metaslider-tipsy-styles', METASLIDER_ASSETS_URL . 'tipsy/tipsy.css', false, METASLIDER_VERSION);
- Exclude checks
Line exceeds 120 characters; contains 356 characters Open
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='number' min='{$row['min']}' max='{$row['max']}' step='{$row['step']}' name='settings[{$id}]' value='{$row['value']}' ><span class='after'>{$row['after']}</span></td></tr>";
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
wp_enqueue_script('metaslider-colorbox', METASLIDER_ASSETS_URL . 'colorbox/jquery.colorbox-min.js', ['jquery'], METASLIDER_VERSION);
- Exclude checks
Line exceeds 120 characters; contains 143 characters Open
'useWithCaution' => __("Caution: This setting is for advanced developers only. If you're unsure, leave it checked.", 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
if ((isset($_GET['page']) && 'metaslider' === $_GET['page']) || (isset($_GET['tab']) && in_array($_GET['tab'], $metaslider_tabs))) {
- Exclude checks
Line exceeds 120 characters; contains 153 characters Open
echo "<p style='text-align: center; font-size: 1.2em;'><b>NEW: </b> Animated HTML <b>Layer</b> Slides (with an awesome Drag & Drop editor!)</p>";
- Exclude checks
Line exceeds 120 characters; contains 168 characters Open
wp_enqueue_script('metaslider-admin-script', METASLIDER_ASSETS_URL . 'metaslider/admin.js', ['jquery', 'metaslider-tipsy', 'media-upload'], METASLIDER_VERSION);
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
$navigation_row = "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><ul>";
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
echo "<a class='probutton' href='{$link}' target='_blank'>Get <span class='logo'><strong>Meta</strong>Slider</span><span class='super'>Pro</span></a>";
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
$navigation_row = "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><ul>";
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
$return .= apply_filters('metaslider_get_available_themes', $themes, $this->slider->get_setting('theme'));
- Exclude checks
Line exceeds 120 characters; contains 154 characters Open
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
wp_enqueue_script('metaslider-tipsy', METASLIDER_ASSETS_URL . 'tipsy/jquery.tipsy.js', ['jquery'], METASLIDER_VERSION);
- Exclude checks
Line exceeds 120 characters; contains 237 characters Open
<input class='alignright button button-primary' type='submit' name='preview' id='ms-preview' value='<?php _e('Save & Preview', 'metaslider') ?>' data-slider_id='<?php echo $this->slider->id ?>'
- Exclude checks
Line exceeds 120 characters; contains 158 characters Open
$navigation_row .= "<li><label><input type='radio' name='settings[{$id}]' value='{$k}' {$checked} {$disabled}>{$v['label']}</label></li>";
- Exclude checks
Line exceeds 120 characters; contains 154 characters Open
'sliceDown' => ['class' => 'option nivo', 'label' => __('Slide Down', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 199 characters Open
'helptext' => __('Smart Crop ensures your responsive slides are cropped to a ratio that results in a consistent slideshow size', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 174 characters Open
'helptext' => __('Pause the slideshow when hovering over slider, then resume when no longer hovering.', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 204 characters Open
<textarea readonly='readonly'><?php echo do_shortcode("[metaslider id=<?php echo $this->slider->id ?>]"); ?></textarea></div>
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
<div class="g-plusone" data-size="medium" data-href="http://www.metaslider.com"></div>
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
scrolling="no" frameborder="0" allowTransparency="true"></iframe>
- Exclude checks
Line exceeds 120 characters; contains 218 characters Open
echo "<p style='text-align: center; font-size: 1.2em; margin-top: 50px;'>Get the Pro Addon pack to add support for: <b>Post Feed</b> Slides, <b>YouTube</b> Slides, <b>HTML</b> Slides & <b>Vimeo</b> Slides</p>";
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
wp_enqueue_script('metaslider-admin-addslide', METASLIDER_ASSETS_URL . 'metaslider/image/image.js', ['metaslider-admin-script'], METASLIDER_VERSION);
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
'content' => "<p><a href='http://www.metaslider.com/documentation/' target='blank'>Meta Slider Documentation</a></p>",
- Exclude checks
Line exceeds 120 characters; contains 204 characters Open
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><select class='option {$row['class']} {$id}' name='settings[{$id}]'>";
- Exclude checks
Line exceeds 120 characters; contains 240 characters Open
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='{$id}' value='{$row['value']}' ></td></tr>";
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
'boxRain' => ['class' => 'option nivo', 'label' => __('Box Rain', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
'helptext' => __('Transition between slides automatically', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
'checked' => 'true' === $this->slider->get_setting('smartCrop') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
'helptext' => __('Display multiple slides at once. Slideshow output will be 100% wide.', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
'helptext' => __("Set the text for the 'previous' direction item", 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
'helptext' => __('Opacity of title and navigation', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 170 characters Open
'helptext' => __('Specify any custom CSS Classes you would like to be added to the slider wrapper', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
'helptext' => __('Uncheck this is you would like to include your own Javascript', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 153 characters Open
<input readonly='readonly' type='text' value='[metaslider id=<?php echo $this->slider->id ?>]'></div>
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
echo "<p style='text-align: center; font-size: 1.2em;'><b>NEW:</b> Thumbnail Navigation for Flex & Nivo Slider!</p>";
- Exclude checks
Line exceeds 120 characters; contains 236 characters Open
$goPro = "<div style='display: none;' id='screen-options-link-wrap'><a target='_blank' class='show-settings' href='{$link}'>Meta Slider v" . METASLIDER_VERSION . ' - ' . __('Upgrade to Pro $19', 'metaslider') . '</a></div>';
- Exclude checks
Line exceeds 120 characters; contains 169 characters Open
$navigation_row .= "<li><label><input type='radio' name='settings[{$id}]' value='{$k}' {$checked} class='radio {$class}'>{$v['label']}</label></li>";
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
'flex' => ['label' => __('Flex Slider', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
'nivo' => ['label' => __('Nivo Slider', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
'random' => ['class' => 'option coin nivo', 'label' => __('Random', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
'sliceUpLeft' => ['class' => 'option nivo', 'label' => __('Slide Up Left', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 164 characters Open
'fade' => ['class' => 'option nivo flex responsive', 'label' => __('Fade', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 154 characters Open
'boxRandom' => ['class' => 'option nivo', 'label' => __('Box Random', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
'helptext' => __('How long to display each slide, in milliseconds', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
'vertical' => ['label' => __('Vertical', 'metaslider'), 'class' => ''],
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
'helptext' => __("Set the text for the 'next' direction item", 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 141 characters Open
'helptext' => __('Delay adding the flexslider class to the slideshow', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
<li rel='tab-1' class='selected'><?php _e('Shortcode', 'metaslider') ?></li>
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
<p><?php _e('Copy & paste the shortcode directly into any WordPress post or page.', 'metaslider'); ?></p>
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
$links[] = '<a href="http://www.metaslider.com/upgrade" target="_blank">' . __('Go Pro', 'metaslider') . '</a>';
- Exclude checks
Line exceeds 120 characters; contains 214 characters Open
echo "<div class='nav-tab nav-tab-active'><input type='text' name='title' value='" . $tab['title'] . "' onfocus='this.style.width = ((this.value.length + 1) * 9) + \"px\"' ></div>";
- Exclude checks
Line exceeds 120 characters; contains 158 characters Open
'slideInRight' => ['class' => 'option nivo', 'label' => __('Slide In Right', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
'light' => ['class' => 'option nivo', 'label' => __('Light (Nivo)', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 150 characters Open
'label' => __('Number of squares', 'metaslider') . ' (' . __('Height', 'metaslider') . ')',
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
'value' => 'false' === $this->slider->get_setting('prevText') ? '' : $this->slider->get_setting('prevText'),
- Exclude checks
Line exceeds 120 characters; contains 293 characters Open
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.metaslider.com" data-text="Check out Meta Slider, an easy to use slideshow plugin for WordPress" data-hashtags="metaslider, wordpress, slideshow">Tweet</a>
- Exclude checks
Line exceeds 120 characters; contains 257 characters Open
<a class='delete-slider alignright button-secondary confirm' href='<?php echo wp_nonce_url("?page=metaslider&delete={$this->slider->id}", 'metaslider_delete_slider'); ?>'><?php _e('Delete Slider', 'metaslider') ?></a>
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
echo "<div id='message' class='updated'><p>" . __("New slideshow created. Click 'Add Slide' to get started!", 'metaslider') . '</p></div>';
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
echo "<option value='?page=metaslider&id={$tab['id']}'{$selected}>{$tab['title']}</option>";
- Exclude checks
Line exceeds 120 characters; contains 143 characters Open
'bar' => ['class' => 'option nivo', 'label' => __('Bar (Nivo)', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 136 characters Open
'checked' => 'true' === $this->slider->get_setting('printJs') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 176 characters Open
<p><?php _e('Copy & paste this code into a template file to include the slideshow within your theme.', 'metaslider'); ?></p>
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
'sliceUpDown' => ['class' => 'option nivo', 'label' => __('Slice Up Down', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
'thumbnails' => ['label' => __('Thumbnails (Pro)', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
'checked' => 'true' === $this->slider->get_setting('fullWidth') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
'checked' => 'true' === $this->slider->get_setting('hoverPause') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
'value' => 'false' === $this->slider->get_setting('cssClass') ? '' : $this->slider->get_setting('cssClass'),
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
. '/metaslider/matchalabs.png); background-repeat: no-repeat; background-position: left bottom;"></span> '
- Exclude checks
Line exceeds 120 characters; contains 250 characters Open
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='settings[{$id}]' value='{$row['value']}' ></td></tr>";
- Exclude checks
Line exceeds 120 characters; contains 164 characters Open
var metaslider_pro_active = <?php echo function_exists('is_plugin_active') && is_plugin_active('ml-slider-pro/ml-slider-pro.php') ? 'true' : 'false' ?>;
- Exclude checks
Line exceeds 120 characters; contains 173 characters Open
<input class='alignright button button-primary' type='submit' name='save' id='ms-save' value='<?php _e('Save', 'metaslider') ?>'>
- Exclude checks
Line exceeds 120 characters; contains 136 characters Open
'checked' => 'true' === $this->slider->get_setting('reverse') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
'helptext' => __('Reverse the animation direction', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
'label' => __('Number of squares', 'metaslider') . ' (' . __('Width', 'metaslider') . ')',
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
<span class='wp-media-buttons-icon'></span> <?php _e('Add Slide', 'metaslider') ?>
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
'straight' => ['class' => 'option coin', 'label' => __('Straight', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 148 characters Open
'fold' => ['class' => 'option nivo', 'label' => __('Fold', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
'slide' => ['class' => 'option flex', 'label' => __('Slide', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
'dark' => ['class' => 'option nivo', 'label' => __('Dark (Nivo)', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 160 characters Open
'boxRainReverse' => ['class' => 'option nivo', 'label' => __('Box Rain Reverse', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
'helptext' => __('Set the fade in speed of the caption', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
$aFields = apply_filters('metaslider_advanced_settings', $aFields, $this->slider);
- Exclude checks
Line exceeds 120 characters; contains 148 characters Open
'rain' => ['class' => 'option coin', 'label' => __('Rain', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
'default' => ['class' => 'option nivo flex coin responsive', 'label' => __('Default', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
'checked' => 'true' === $this->slider->get_setting('printCss') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
'helptext' => __('Uncheck this is you would like to include your own CSS', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
'sliceUp' => ['class' => 'option nivo', 'label' => __('Slice Up', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
'slideUpDownLeft' => ['class' => 'option nivo', 'label' => __('Slide Up Down Left', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
<h3 class="hndle"><span><?php _e('Advanced Settings', 'metaslider') ?></span></h3>
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
'horizontal' => ['label' => __('Horizontal', 'metaslider'), 'class' => ''],
- Exclude checks
Line exceeds 120 characters; contains 153 characters Open
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
- Exclude checks
Line exceeds 120 characters; contains 204 characters Open
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><select class='option {$row['class']} {$id}' name='settings[{$id}]'>";
- Exclude checks
Line exceeds 120 characters; contains 193 characters Open
data-slider_width='<?php echo $this->slider->get_setting('width') ?>' data-slider_height='<?php echo $this->slider->get_setting('height') ?>'>
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
'checked' => 'true' === $this->slider->get_setting('center') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 141 characters Open
'checked' => 'true' === $this->slider->get_setting('carouselMode') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
'checked' => 'true' === $this->slider->get_setting('random') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
'checked' => 'true' === $this->slider->get_setting('noConflict') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
<a href='#' class='button alignright add-slide' data-editor='content' title='<?php _e('Add Slide', 'metaslider') ?>'>
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
'coin' => ['label' => __('Coin Slider', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
'helptext' => __('Show the slide navigation bullets', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
'value' => 'false' === $this->slider->get_setting('nextText') ? '' : $this->slider->get_setting('nextText'),
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
'swirl' => ['class' => 'option coin', 'label' => __('Swirl', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 165 characters Open
'boxRainGrowReverse' => ['class' => 'option nivo', 'label' => __('Box Rain Grow Reverse', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
$aFields = apply_filters('metaslider_basic_settings', $aFields, $this->slider);
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
'helptext' => __("Stretch the slideshow output to fill it's parent container", 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
'helptext' => __('Randomise the order of the slides', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
echo "<a href='?page=metaslider&id={$tab['id']}' class='nav-tab'>" . $tab['title'] . '</a>';
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
'slideInLeft' => ['class' => 'option nivo', 'label' => __('Slide In Left', 'metaslider')],
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
'checked' => 'true' === $this->slider->get_setting('links') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
'checked' => 'true' === $this->slider->get_setting('autoPlay') ? 'checked' : '',
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
'helptext' => __('Set the speed of animations, in milliseconds', 'metaslider'),
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
<iframe style='border:none; overflow:hidden; width:80px; height:21px;'
- Exclude checks
Line exceeds 120 characters; contains 298 characters Open
src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.metaslider.com&send=false&layout=button_count&width=90&show_faces=false&font&colorscheme=light&action=like&height=21&appId=156668027835524"
- Exclude checks
The variable $shortcode_settings is not named in camelCase. Open
private function create_slider($type, $id, $shortcode_settings)
{
switch ($type) {
case ('coin'):
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $max_tabs is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $shortcode_settings is not named in camelCase. Open
private function create_slider($type, $id, $shortcode_settings)
{
switch ($type) {
case ('coin'):
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $shortcode_settings is not named in camelCase. Open
private function create_slider($type, $id, $shortcode_settings)
{
switch ($type) {
case ('coin'):
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $add_url is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $metaslider_tabs is not named in camelCase. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $shortcode_settings is not named in camelCase. Open
public function set_slider($id, $shortcode_settings = [])
{
$type = 'flex';
$settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $slider_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function all_meta_sliders($sort_key = 'date')
{
$sliders = false;
// list the tabs
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $shortcode_settings is not named in camelCase. Open
private function create_slider($type, $id, $shortcode_settings)
{
switch ($type) {
case ('coin'):
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $slider_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $add_url is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $slider_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $last_modified is not named in camelCase. Open
private function add_slider()
{
// check nonce
check_admin_referer('metaslider_add_slider');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $sort_key is not named in camelCase. Open
private function all_meta_sliders($sort_key = 'date')
{
$sliders = false;
// list the tabs
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $navigation_row is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $slider_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $temp_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function find_slider($orderby, $order)
{
$args = [
'force_no_custom_order' => true,
'post_type' => 'ml-slider',
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $shortcode_settings is not named in camelCase. Open
public function set_slider($id, $shortcode_settings = [])
{
$type = 'flex';
$settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $slider_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function all_meta_sliders($sort_key = 'date')
{
$sliders = false;
// list the tabs
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $navigation_row is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $navigation_row is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $add_url is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $add_url is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $last_modified is not named in camelCase. Open
private function add_slider()
{
// check nonce
check_admin_referer('metaslider_add_slider');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $navigation_row is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $max_tabs is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function find_slider($orderby, $order)
{
$args = [
'force_no_custom_order' => true,
'post_type' => 'ml-slider',
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function all_meta_sliders($sort_key = 'date')
{
$sliders = false;
// list the tabs
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function all_meta_sliders($sort_key = 'date')
{
$sliders = false;
// list the tabs
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $navigation_row is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $max_tabs is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $shortcode_settings is not named in camelCase. Open
private function create_slider($type, $id, $shortcode_settings)
{
switch ($type) {
case ('coin'):
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $temp_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $slider_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function all_meta_sliders($sort_key = 'date')
{
$sliders = false;
// list the tabs
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $navigation_row is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $max_tabs is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $max_tabs is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $temp_id is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $last_modified is not named in camelCase. Open
private function add_slider()
{
// check nonce
check_admin_referer('metaslider_add_slider');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $metaslider_tabs is not named in camelCase. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $navigation_row is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $navigation_row is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function find_slider($orderby, $order)
{
$args = [
'force_no_custom_order' => true,
'post_type' => 'ml-slider',
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $the_query is not named in camelCase. Open
private function find_slider($orderby, $order)
{
$args = [
'force_no_custom_order' => true,
'post_type' => 'ml-slider',
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method register_admin_styles is not named in camelCase. Open
public function register_admin_styles()
{
wp_enqueue_style('metaslider-admin-styles', METASLIDER_ASSETS_URL . 'metaslider/admin.css', false, METASLIDER_VERSION);
wp_enqueue_style('metaslider-colorbox-styles', METASLIDER_ASSETS_URL . 'colorbox/colorbox.css', false, METASLIDER_VERSION);
wp_enqueue_style('metaslider-tipsy-styles', METASLIDER_ASSETS_URL . 'tipsy/tipsy.css', false, METASLIDER_VERSION);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method register_admin_menu is not named in camelCase. Open
public function register_admin_menu()
{
$title = apply_filters('metaslider_menu_title', 'Meta Slider');
$page = add_menu_page($title, $title, 'edit_others_posts', 'metaslider', [
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method delete_slider is not named in camelCase. Open
private function delete_slider($id)
{
// check nonce
check_admin_referer('metaslider_delete_slider');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method register_admin_scripts is not named in camelCase. Open
public function register_admin_scripts()
{
if (wp_script_is('wp-auth-check', 'queue')) {
// meta slider checks for active AJAX requests in order to show the spinner
// .. but the auth-check runs an AJAX request every 15 seconds
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method create_slider is not named in camelCase. Open
private function create_slider($type, $id, $shortcode_settings)
{
switch ($type) {
case ('coin'):
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method build_settings_rows is not named in camelCase. Open
public function build_settings_rows($aFields)
{
// order the fields by priority
uasort($aFields, [$this, 'compare_elems']);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method metaslider_pro_tab is not named in camelCase. Open
public function metaslider_pro_tab()
{
if (function_exists('is_plugin_active') && !is_plugin_active('ml-slider-pro/ml-slider-pro.php')) {
return wp_iframe([$this, 'iframe']);
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method register_taxonomy is not named in camelCase. Open
public function register_taxonomy()
{
register_taxonomy('ml-slider', 'attachment', [
'hierarchical' => true,
'public' => false,
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method register_shortcode is not named in camelCase. Open
public function register_shortcode($atts)
{
if (!isset($atts['id'])) {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method set_slider is not named in camelCase. Open
public function set_slider($id, $shortcode_settings = [])
{
$type = 'flex';
$settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method upgrade_to_pro is not named in camelCase. Open
public function upgrade_to_pro($links)
{
if (function_exists('is_plugin_active') && !is_plugin_active('ml-slider-pro/ml-slider-pro.php')) {
$links[] = '<a href="http://www.metaslider.com/upgrade" target="_blank">' . __('Go Pro', 'metaslider') . '</a>';
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method all_meta_sliders is not named in camelCase. Open
private function all_meta_sliders($sort_key = 'date')
{
$sliders = false;
// list the tabs
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method help_tab is not named in camelCase. Open
public function help_tab()
{
$screen = get_current_screen();
// documentation tab
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method custom_media_uploader_tabs is not named in camelCase. Open
public function custom_media_uploader_tabs($strings)
{
//update strings
if (\Xmf\Request::hasVar('page', 'GET') && 'metaslider' == $_GET['page']) {
$strings['insertMediaTitle'] = __('Image', 'metaslider');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method admin_process is not named in camelCase. Open
public function admin_process()
{
// this function should only ever be called from the Meta Slider admin page.
if (!is_admin()) {
return;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method render_admin_page is not named in camelCase. Open
public function render_admin_page()
{
$this->admin_process();
$this->go_pro_cta();
$this->system_check();
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method insert_metaslider_button is not named in camelCase. Open
public function insert_metaslider_button($context)
{
global $pagenow;
if (in_array($pagenow, ['post.php', 'page.php', 'post-new.php', 'post-edit.php'])) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method add_slider is not named in camelCase. Open
private function add_slider()
{
// check nonce
check_admin_referer('metaslider_add_slider');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method find_slider is not named in camelCase. Open
private function find_slider($orderby, $order)
{
$args = [
'force_no_custom_order' => true,
'post_type' => 'ml-slider',
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method go_pro_cta is not named in camelCase. Open
public function go_pro_cta()
{
if (function_exists('is_plugin_active') && !is_plugin_active('ml-slider-pro/ml-slider-pro.php')) {
$link = apply_filters('metaslider_hoplink', 'http://www.metaslider.com/upgrade/');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method system_check is not named in camelCase. Open
public function system_check()
{
$systemCheck = new MetaSliderSystemCheck();
$systemCheck->check();
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method compare_elems is not named in camelCase. Open
private function compare_elems($elem1, $elem2)
{
return $elem1['priority'] > $elem2['priority'];
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_easing_options is not named in camelCase. Open
private function get_easing_options()
{
$options = [
'linear',
'swing',
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method admin_footer is not named in camelCase. Open
public function admin_footer()
{
global $pagenow;
// Only run in post/page creation and edit screens
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method load_plugin_textdomain is not named in camelCase. Open
public function load_plugin_textdomain()
{
load_plugin_textdomain('metaslider', false, \dirname(plugin_basename(__FILE__)) . '/languages/');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method custom_media_upload_tab_name is not named in camelCase. Open
public function custom_media_upload_tab_name($tabs)
{
$metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
// restrict our tab changes to the meta slider plugin page
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method register_post_type is not named in camelCase. Open
public function register_post_type()
{
register_post_type('ml-slider', [
'query_var' => false,
'rewrite' => false,
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method register_slide_types is not named in camelCase. Open
private function register_slide_types()
{
$image = new MetaImageSlide();
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}