Showing 7,504 of 7,504 total issues
Function init
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function(options) {
Galleria.requires(1.4, 'This version of Classic theme requires Galleria 1.4 or later');
// add some elements
Function props
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
props: function( props, attachment ) {
var link, linkUrl, size, sizes, fallbacks,
defaultProps = wp.media.view.settings.defaultProps;
// Final fallbacks run after all processing has been completed.
Function docKeyPress
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
var docKeyPress = function(event) {
var k = options.keys, d, t, key = event.keyCode || event.which;
d = !isNaN(k.alt) && (event.altKey || event.originalEvent.altKey) ? k.alt :
!isNaN(k.ctrl) && event.ctrlKey ? k.ctrl :
Function load
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.prototype.load = function() {
// pass if no data is provided or picasa option not found
if ( arguments.length || typeof this._options.picasa !== 'string' ) {
load.apply( this, Galleria.utils.array( arguments ) );
Function initialize
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function(handle, track, options) {
var slider = this;
if (Object.isArray(handle)) {
this.handles = handle.collect( function(e) { return $(e) });
Method privExtractFileAsString
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
{
$v_result=1;
// ----- Read the file header
Function init
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function(options) {
Galleria.requires(1.4, 'This version of Classic theme requires Galleria 1.4 or later');
// add some elements
Method get_admin_page_parent
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_admin_page_parent( $parent = '' ) {
global $parent_file;
global $menu;
global $submenu;
global $pagenow;
Method save_post
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function save_post(&$post, &$comments, &$pings) {
// Reset the counter
set_time_limit(30);
$post = get_object_vars($post);
$post = add_magic_quotes($post);
Method users2wp
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function users2wp($users='')
{
// General Housekeeping
global $wpdb;
$count = 0;
Method get_posts
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_posts() {
global $wpdb;
set_magic_quotes_runtime(0);
$datalines = file($this->file); // Read the file into an array
Method ParseDIVXTAG
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function ParseDIVXTAG($DIVXTAG, $raw=false) {
// structure from "IDivX" source, Form1.frm, by "Greg Frazier of Daemonic Software Group", email: gfrazier@icestorm.net, web: http://dsg.cjb.net/
// source available at http://files.divx-digest.com/download/c663efe7ef8ad2e90bf4af4d3ea6188a/on0SWN2r/edit/IDivX.zip
// 'Byte Layout: '1111111111111111
// '32 for Movie - 1 '1111111111111111
Method tag_open
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tag_open($parser, $tag, $attributes)
{
list($this->namespace[], $this->element[]) = $this->split_ns($tag);
$attribs = array();
Method replace_invalid_with_pct_encoding
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function replace_invalid_with_pct_encoding($string, $valid_chars, $case = SIMPLEPIE_SAME_CASE)
{
// Normalise case
if ($case & SIMPLEPIE_LOWERCASE)
{
Method url_to_postid
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function url_to_postid($url) {
global $wp_rewrite;
$url = apply_filters('url_to_postid', $url);
Identical blocks of code found in 4 locations. Consider refactoring. Open
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('.navbar-fixed-top').addClass('opaque');
} else {
$('.navbar-fixed-top').removeClass('opaque');
- 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 76.
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
Identical blocks of code found in 4 locations. Consider refactoring. Open
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('.navbar-fixed-top').addClass('opaque');
} else {
$('.navbar-fixed-top').removeClass('opaque');
- 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 76.
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
Identical blocks of code found in 4 locations. Consider refactoring. Open
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('.navbar-fixed-top').addClass('opaque');
} else {
$('.navbar-fixed-top').removeClass('opaque');
- 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 76.
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
Identical blocks of code found in 4 locations. Consider refactoring. Open
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('.navbar-fixed-top').addClass('opaque');
} else {
$('.navbar-fixed-top').removeClass('opaque');
- 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 76.
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
common:{
edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
apply:"Apply",
insert:"Insert",
update:"Update",
- 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 76.
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