Function llms_update_3160_attempt_migration
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
function llms_update_3160_attempt_migration() {
global $wpdb;
$query = $wpdb->get_results( "SELECT user_id, meta_value FROM {$wpdb->usermeta} WHERE meta_key = 'llms_quiz_data' LIMIT 100;" ); // db call ok; no-cache ok.
- 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 llms_update_3160_update_question_data
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
function llms_update_3160_update_question_data() {
if ( 'complete' !== get_transient( 'llms_update_3160_ensure_no_lesson_dupe_rels' ) ) {
return true;
}
- 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
File llms-functions-updates-3160.php
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Wontfix
<?php
/**
* Update functions for version 3.16.0
*
* @package LifterLMS/Functions/Updates
Function llms_update_3160_ensure_no_dupe_question_rels
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
function llms_update_3160_ensure_no_dupe_question_rels() {
if ( 'complete' !== get_transient( 'llms_update_3160_attempt_migration' ) ) {
return true;
}
- 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 llms_update_3160_ensure_no_lesson_dupe_rels
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function llms_update_3160_ensure_no_lesson_dupe_rels() {
if ( 'complete' !== get_transient( 'llms_update_3160_ensure_no_dupe_question_rels_status' ) ) {
return true;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method llms_update_3160_update_question_data
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function llms_update_3160_update_question_data() {
if ( 'complete' !== get_transient( 'llms_update_3160_ensure_no_lesson_dupe_rels' ) ) {
return true;
}
Method llms_update_3160_attempt_migration
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function llms_update_3160_attempt_migration() {
global $wpdb;
$query = $wpdb->get_results( "SELECT user_id, meta_value FROM {$wpdb->usermeta} WHERE meta_key = 'llms_quiz_data' LIMIT 100;" ); // db call ok; no-cache ok.
Method llms_update_3160_ensure_no_dupe_question_rels
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
function llms_update_3160_ensure_no_dupe_question_rels() {
if ( 'complete' !== get_transient( 'llms_update_3160_attempt_migration' ) ) {
return true;
}
Method llms_update_3160_ensure_no_lesson_dupe_rels
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function llms_update_3160_ensure_no_lesson_dupe_rels() {
if ( 'complete' !== get_transient( 'llms_update_3160_ensure_no_dupe_question_rels_status' ) ) {
return true;
}
Function llms_update_3160_update_attempt_question_data
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function llms_update_3160_update_attempt_question_data() {
if ( 'complete' !== get_transient( 'llms_update_3160_update_question_data' ) ) {
return true;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method llms_update_3160_update_attempt_question_data
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function llms_update_3160_update_attempt_question_data() {
if ( 'complete' !== get_transient( 'llms_update_3160_update_question_data' ) ) {
return true;
}
Function llms_update_3160_update_quiz_to_lesson_rels
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function llms_update_3160_update_quiz_to_lesson_rels() {
if ( 'complete' !== get_transient( 'llms_update_3160_update_attempt_question_data' ) ) {
return true;
}
- 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"