core/admin/options/functions/Coin_List.php
Method poulate_the_data
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function poulate_the_data() {
global $wpdb, $wapg_tables;
$search = '';
if ( isset( $_GET['s'] ) && ! empty( $skey = $_GET['s'] ) ) {
$search = " where c.name like '%{$skey}%'";
Method column_offer_info
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function column_offer_info( $item ) {
if ( $item->offer_status > 0 ) {
?>
<table class="wp-list-table widefat fixed striped offer hidden">
Function process_bulk_action
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
function process_bulk_action() {
global $wpdb, $wapg_tables;
// security check!
if ( isset( $_GET['_wpnonce'] ) && ! empty( $_GET['_wpnonce'] ) ) {
- 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 poulate_the_data
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
private function poulate_the_data() {
global $wpdb, $wapg_tables;
$search = '';
if ( isset( $_GET['s'] ) && ! empty( $skey = $_GET['s'] ) ) {
$search = " where c.name like '%{$skey}%'";
- 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"