Code Analysis: Block Visibility 3.4.0

Function Rating Maintainability Complexity Lines of code
user_role_test()
D
23
66 151
acf_test()
D
31 41 99
visibility_presets_test()
D
34 35 89
query_string_test()
C
38 27 68
metadata_test()
C
39 26 65
cookie_test()
C
39 26 65
woocommerce_test()
C
39 25 62
edd_test()
C
40 25 60
browser_device_test()
C
39 24 63
location_test()
C
39 24 62
date_time_test()
B
40 24 54
run_browser_type_test()
B
43 24 43
register_settings()
B
23
1 367
run_rule_tests()
B
39 21 66
wp_fusion_test()
B
40 20 64
run_acf_rule_tests()
B
40 19 63
Block_Visibility_REST_Variables_Controller::get_woocommerce_products()
B
38 19 63
referral_source_test()
B
43 20 46
run_rule_tests()
B
40 19 60
get_product_information_from_orders()
B
40 19 59
run_location_archive_type_test()
B
46 20 34
Block_Visibility_REST_Variables_Controller::get_edd_products()
B
39 18 59
run_schedule_test()
B
48 20 29
run_time_of_day_test()
B
42 18 54
run_device_platform_test()
B
45 19 37
run_customer_time_since_category_ordered_test()
B
42 18 49
run_customer_time_since_product_ordered_test()
B
42 18 49
run_customer_time_since_product_ordered_test()
B
42 18 49
run_customer_time_since_category_ordered_test()
B
42 18 49
meta_value_compare()
B
44 17 47
run_customer_date_of_category_ordered_test()
B
43 17 45
run_customer_date_of_product_ordered_test()
B
43 17 45
run_customer_date_of_category_ordered_test()
B
43 17 45
run_customer_date_of_product_ordered_test()
B
43 17 45
cookie_value_compare()
B
46 17 42
url_path_test()
B
46 17 37
run_location_rule_tests()
B
43 16 51
get_product_information_from_cart()
B
42 16 51
run_location_archive_test()
A
47 16 35
run_cart_contents_test()
A
47 16 34
run_cart_contents_test()
A
47 16 34
get_payments_by_date()
A
41 14 56
Block_Visibility_REST_Variables_Controller::get_acf_fields()
A
43 14 53
run_customer_quantity_category_ordered_test()
A
44 14 43
get_payments_by_date()
A
41 13 58
run_customer_quantity_product_ordered_test()
A
45 14 42
run_customer_quantity_product_ordered_test()
A
47 14 35
run_location_author_test()
A
49 14 29
visibility_presets_add_custom_classes()
A
45 13 41
run_location_page_type_test()
A
46 13 39
get_advanced_styles()
A
40 11 63
run_customer_quantity_category_ordered_test()
A
48 13 33
integer_value_compare()
A
51 13 28
run_location_relative_hierarchy_test()
A
46 12 39
run_cart_category_quantity_test()
A
49 12 30
run_device_type_test()
A
49 12 30
run_cart_category_quantity_test()
A
49 12 30
run_cart_product_quantity_test()
A
49 12 29
run_cart_product_quantity_test()
A
49 12 29
run_location_hierarchy_test()
A
48 11 32
control_sets_test()
A
49 11 32
run_location_comments_test()
A
49 11 30
get_category_information_from_products()
A
52 11 24
create_date_time()
A
48 10 33
get_product_information_from_cart()
A
54 11 18
render_block_widget_with_visibility()
A
50 10 27
get_default_styles()
A
45 9 42
run_location_post_taxonomy_test()
A
51 10 27
add_screen_size_classes()
A
46 9 40
get_category_information_from_products()
A
55 10 19
run_customer_date_of_order_test()
A
49 9 30
run_customer_time_since_order_test()
A
49 9 30
run_customer_time_since_order_test()
A
49 9 30
run_customer_date_of_order_test()
A
49 9 30
run_customer_average_order_value_test()
A
50 9 29
enqueue_settings_assets()
A
45 8 42
run_wp_fusion_tests()
A
52 9 27
run_location_post_test()
A
51 9 26
run_customer_average_order_value_test()
A
51 9 26
get_products_by_payment_date()
A
53 9 24
run_user_rule_tests()
A
53 9 24
get_categories_by_payment_date()
A
53 9 24
get_categories_by_payment_date()
A
53 9 24
get_products_by_payment_date()
A
53 9 24
run_product_quantity_in_stock_test()
A
53 9 24
run_location_supports_test()
A
53 9 23
date_value_compare()
A
55 9 20
contains_value_compare()
A
58 9 14
get_product_information_from_orders()
A
52 8 25
run_customer_total_orders_test()
A
52 8 25
run_users_test()
A
54 8 22
control_sets_custom_classes()
A
54 8 22
run_user_role_test()
A
53 8 21
run_cookie_rule_tests()
A
56 8 18
Block_Visibility_REST_Variables_Controller::get_variables()
S
40 4 73
Block_Visibility_REST_Variables_Controller::get_wp_fusion_tags()
S
51 7 28
enqueue_block_editor_styles()
S
46 6 43
render_with_visibility()
S
53 7 24
Block_Visibility_REST_Variables_Controller::get_item_schema()
S
38 2 96
get_setting()
S
56 7 20
screen_size_test()
S
55 7 20
run_location_thumbnail_test()
S
56 7 18
run_location_post_type_test()
S
57 7 16
process_product_data()
S
52 6 28
boolean_value_compare()
S
60 7 12
any_value_compare()
S
60 7 12
run_cart_total_value_test()
S
61 7 11
run_cart_total_quantity_test()
S
61 7 11
run_browser_device_rule_tests()
S
55 6 21
run_day_of_week_test()
S
55 6 21
run_customer_total_spent_test()
S
56 6 18
run_location_post_id_test()
S
55 6 18
run_customer_total_orders_test()
S
56 6 18
run_metadata_user_test()
S
57 6 17
append_content_classes()
S
49 5 32
run_metadata_post_test()
S
57 6 17
run_customer_total_spent_test()
S
59 6 14
Block_Visibility_REST_Settings_Controller::update_settings()
S
50 5 29
run_product_inventory_test()
S
59 6 14
is_visible()
S
55 5 21
run_metadata_rule_tests()
S
57 5 18
add_inline_styles()
S
59 5 15
Block_Visibility::includes()
S
59 5 15
get_payments()
S
51 4 29
run_cart_total_quantity_test()
S
62 5 11
run_cart_total_value_test()
S
62 5 11
add_custom_classes()
S
56 4 21
get_user_roles()
S
50 3 31
get_current_user_role()
S
61 4 14
is_block_type_disabled()
S
62 4 12
Block_Visibility::conditionally_remove_attributes()
S
63 4 10
check_width()
S
71 4 6
hide_block_test()
S
64 4 10
get_plugin_setting()
S
65 4 9
is_control_enabled()
S
63 3 12
prepare_queries()
S
62 3 12
enqueue_editor_scripts()
S
53 2 25
add_plugin_row_meta()
S
57 2 17
Block_Visibility_REST_Variables_Controller::register_routes()
S
51 1 31
get_screen_size_styles()
S
61 2 14
Block_Visibility::pro_deprecation_message()
S
62 2 14
Block_Visibility_REST_Settings_Controller::register_routes()
S
56 1 20
prepare_url_values()
S
69 2 7
get_product_id()
S
69 2 7
add_plugin_action_links()
S
63 2 10
Block_Visibility_REST_Settings_Controller::get_settings()
S
66 2 8
Block_Visibility_REST_Variables_Controller::get_wp_fusion_exclude_admins()
S
69 2 7
register_visibility_preset_post_type()
S
59 1 15
Block_Visibility::define()
S
75 2 5
set_max_width()
S
66 2 8
Block_Visibility::instance()
S
69 2 7
get_asset_file()
S
65 2 9
prepare_url_paths()
S
69 2 7
Block_Visibility::add_attributes_to_registered_blocks()
S
70 2 6
Block_Visibility_REST_Variables_Controller::is_integration_enabled()
S
72 2 5
Block_Visibility::setting_scripts_localization()
S
67 2 9
Block_Visibility::editor_scripts_localization()
S
67 2 9
has_visibility_settings()
S
71 2 6
register_routes()
S
72 1 6
add_settings_page()
S
65 1 10
Block_Visibility::__clone()
S
70 1 7
Block_Visibility::define_constants()
S
67 1 7
Block_Visibility_REST_Settings_Controller::update_settings_permissions_check()
S
80 1 3
Block_Visibility::__construct()
S
75 1 5
Block_Visibility::__wakeup()
S
70 1 7
snake_to_camel_case()
S
73 1 5
custom_admin_footer()
S
68 1 8
Block_Visibility::load_textdomain()
S
70 1 7
print_settings_page()
S
100 1 5
enqueue_editor_styles()
S
66 1 9
Block_Visibility::actions()
S
65 1 8
block_visibility_load_plugin()
S
82 1 3