Code Analysis: Omnisend for WooCommerce 1.15.0

Function Rating Maintainability Complexity Lines of code
Omnisend_Product::__construct()
D
18
72 199
Omnisend_Order::__construct()
D
19
58 199
Omnisend_Manager_Assistant::batch_check()
D
32 40 83
Omnisend_Contact::__construct()
D
32 32 95
omnisend_show_sync()
C
28
23 175
Omnisend_Cart::__construct()
B
38 23 58
Omnisend_Manager::push_product_to_omnisend()
B
41 17 47
omnisend_show_logs()
A
36 13 85
Omnisend_Manager_Assistant::sync_all_orders()
A
39 14 62
Omnisend_Manager_Assistant::sync_all_contacts()
A
38 13 70
Omnisend_Manager_Assistant::sync_all_products()
A
38 12 70
Omnisend_Helper::omnisend_api()
A
39 12 65
Omnisend_Manager::push_contact_to_omnisend()
A
44 11 43
Omnisend_Manager::push_cart_to_omnisend()
A
45 11 40
Omnisend_Manager::update_order_status()
A
47 11 32
Omnisend_Manager::push_order_to_omnisend()
A
46 10 36
Omnisend_Manager::push_category_to_omnisend()
A
47 10 32
omnisend_restore_cart()
A
45 9 39
omnisend_update_contact_status()
A
43 7 51
Omnisend_Manager::update_account_info()
A
54 9 18
omnisend_update_plugin_setting()
A
50 8 28
Omnisend_Ajax::identify_by_email()
S
50 7 27
detect_omnisend_plugin_updates()
S
53 7 23
Omnisend_Install::delete_omnisend_webhooks()
S
52 7 23
omnisend_post_omnisend_settings()
S
55 7 21
Omnisend_Helper::get_client_ip()
S
56 7 21
Omnisend_Cart::set_cart_id()
S
55 7 19
Omnisend_Logger::hook()
S
54 7 19
Omnisend_Event_Tracker::track_event()
S
50 6 30
Omnisend_Helper::get_account_info()
S
50 6 25
omnisend_display_checkout_opt_in_checkbox_settings()
S
45 3 67
omnisend_woocommerce_menu()
S
55 6 19
Omnisend_Contact_Resolver::update_by_user_id()
S
56 6 17
omnisend_add_order_status_url_to_webhook_payload()
S
59 6 14
Omnisend_Notifications::skip_notification()
S
61 6 12
omnisend_rebuild_cart()
S
51 5 26
omnisend_show_settings_page()
S
54 5 22
Omnisend_Cart_Event::added_product_to_cart()
S
54 5 22
omnisend_display_sync_actions()
S
58 5 20
omnisend_order_created()
S
56 5 19
Omnisend_Manager_Assistant::sync_all_categories()
S
57 5 18
Omnisend_Connection_Error::__construct()
S
57 5 18
omnisend_has_sync_stats_skipped()
S
62 5 15
omnisend_has_sync_stats_not_synced()
S
62 5 15
omnisend_display_notice()
S
53 4 30
omnisend_has_sync_stats_error()
S
62 5 15
Omnisend_Logs::send()
S
58 5 15
Omnisend_Sync_Manager::are_data_syncing()
S
61 5 15
Omnisend_Content::get_content_from_api()
S
59 5 12
omnisend_display_connection_info()
S
51 3 41
validate_connect_token()
S
52 4 26
omnisend_rest_api_authorization()
S
53 4 26
omnisend_add_menu_classes()
S
62 5 11
Omnisend_Logs_Sender::send()
S
51 4 25
omnisend_display_connection_error_notice()
S
49 3 37
omnisend_add_snippet_script()
S
55 4 20
omnisend_display_tag_settings()
S
50 2 48
omnisend_display_tabs()
S
58 4 17
omnisend_get_system_status()
S
49 3 32
Omnisend_Cart_Event::build_event_props()
S
49 3 32
Omnisend_Helper::check_wp_wc_compatibility()
S
57 4 16
Omnisend_Category::create_from_id()
S
64 5 9
omnisend_handle_sync_page_actions()
S
61 4 14
Omnisend_Content::get_content()
S
60 4 14
Omnisend_Helper::clean_model_from_empty_fields()
S
61 4 13
Omnisend_Notifications::get_count()
S
61 4 13
omnisend_admin_scripts_and_styles()
S
52 3 28
Omnisend_Manager_Assistant::unset_user_cart()
S
61 4 12
Omnisend_Manager_Assistant::get_orders_to_sync()
S
47 2 42
Omnisend_Sync_Manager::is_all_batches_sync_finished()
S
63 4 12
Omnisend_Sync_Stats_Repository::get_contact_stats()
S
46 1 50
omnisend_uninstall()
S
54 3 20
omnisend_checkbox_custom_checkout_field()
S
55 3 19
omnisend_add_checkout_script()
S
56 3 18
connect_omnisend_account()
S
57 3 17
Omnisend_Ajax::generate_contact_payload()
S
58 3 17
omnisend_show_api_access_notice()
S
60 3 15
omnisend_display_success()
S
61 3 15
Omnisend_Sync_Manager::start_orders_if_not_finished()
S
59 3 14
Omnisend_Sync_Manager::start_products_if_not_finished()
S
59 3 14
Omnisend_Contact_Resolver::resolve_email_to_contact_id()
S
59 3 14
Omnisend_Sync_Manager::start_contacts_if_not_finished()
S
59 3 14
Omnisend_Sync_Manager::start_categories_if_not_finished()
S
60 3 13
Omnisend_Helper::is_woocommerce_api_access_granted()
S
60 3 13
Omnisend_Contact_Resolver::update_by_email()
S
61 3 12
Omnisend_Settings::get_checkout_opt_in_status()
S
64 3 11
Omnisend_Settings::get_contact_tag_status()
S
64 3 11
Omnisend_Settings::get_logs_status()
S
63 3 11
Omnisend_Product::product_picker()
S
62 3 11
omnisend_display_permalink_notice()
S
56 2 22
Omnisend_Sync_Manager::start_resync_all_with_error_or_skipped()
S
55 2 22
display_connection()
S
58 2 20
omnisend_display_resync_all_contacts()
S
62 2 19
Omnisend_Sync_Stats_Repository::get_stats_from_posts()
S
51 1 31
Omnisend_Logger::log()
S
58 2 16
omnisend_under_marketing_notice()
S
61 2 16
omnisend_show_connection_notice()
S
61 2 16
Omnisend_Category::__construct()
S
68 3 7
Omnisend_Sync_Manager::finish_check_batches()
S
70 3 6
Omnisend_Manager::is_setup()
S
66 3 9
Omnisend_Sync_Stats_Repository::get_category_stats()
S
51 1 30
Omnisend_Notifications::set_viewed()
S
71 3 5
Omnisend_Server_Session::is_session_available()
S
66 3 9
Omnisend_Install::revoke_omnisend_woo_api_keys()
S
65 3 9
Omnisend_Sync_Stats_Repository::get_stats_from_orders()
S
52 1 30
Omnisend_User_Storage::get()
S
63 3 9
Omnisend_Contact_Resolver::get_contact_id_from_omnisend()
S
61 3 10
Omnisend_Cart_Event::build_checkout_url()
S
58 2 15
omnisend_rebuild_cart_page()
S
68 3 9
omnisend_restore_cart_page()
S
70 3 6
omnisend_cart_delete()
S
67 3 9
omnisend_hook_omnisend_ajax_save_email()
S
63 3 9
Omnisend_Install::generate_install_url()
S
59 2 14
Omnisend_Event_Tracker::track()
S
62 2 12
omnisend_display_sync_loader()
S
68 2 11
display_unsupported_wordpress_version()
S
59 1 22
display_woocommerce_not_installed_or_disabled()
S
58 1 22
Omnisend_Helper::get_wc_auth_url()
S
55 1 20
Omnisend_Manager_Assistant::get_not_synced_categories()
S
57 1 18
omnisend_register_localize_enqueue_script()
S
58 1 18
omnisend_display_omnisend_connected()
S
61 1 17
Omnisend_Manager::delete_category_from_omnisend()
S
67 2 7
Omnisend_Sync_Manager::finish_contacts()
S
69 2 7
Omnisend_Logger::ensure_logging_table_exists()
S
60 1 15
Omnisend_Sync_Manager::are_categories_syncing()
S
71 2 6
Omnisend_Cart_Event::started_checkout()
S
72 2 5
Omnisend_Product::get_unhidden_variations()
S
66 2 9
Omnisend_Sync_Manager::is_products_finished()
S
71 2 6
Omnisend_Helper::valid_country_code()
S
71 2 6
Omnisend_Sync_Stats_Repository::build_where_sql_for_posts()
S
67 2 8
Omnisend_Install::omnisend_get_partner_link()
S
67 2 8
Omnisend_Settings::set_brand_id()
S
71 2 6
Omnisend_Sync_Manager::is_orders_finished()
S
71 2 6
Omnisend_Settings::get_contact_tag_value()
S
71 2 6
Omnisend_Server_Session::get()
S
71 2 6
Omnisend_Sync_Manager::finish_orders()
S
69 2 7
Omnisend_Settings::set_option()
S
68 2 7
Omnisend_Notifications::get_viewed()
S
76 2 3
Omnisend_Sync_Manager::stop_orders()
S
71 2 6
Omnisend_Sync_Manager::are_orders_syncing()
S
71 2 6
Omnisend_Logs::init()
S
72 2 5
Omnisend_Logs::sync()
S
66 2 8
Omnisend_Sync_Stats_Repository::get_order_stats()
S
72 2 6
Omnisend_Logger::remove_old_synced_logs()
S
65 2 8
Omnisend_Contact::create()
S
69 2 7
Omnisend_Contact_Resolver::update_by_email_and_contact_id()
S
67 2 7
Omnisend_Sync_Stats_Repository::get_array_field_or_zero()
S
78 2 3
Omnisend_Settings::add_option()
S
66 2 8
Omnisend_Product::create()
S
69 2 7
Omnisend_Sync_Manager::stop_products()
S
71 2 6
Omnisend_Sync_Manager::are_products_syncing()
S
71 2 6
Omnisend_Logger::debug()
S
73 2 5
Omnisend_Install::notify_about_plugin_update()
S
64 2 10
Omnisend_Order::create()
S
69 2 7
Omnisend_Cart::create()
S
70 2 7
Omnisend_Sync_Manager::finish_categories()
S
69 2 7
Omnisend_Sync::was_category_synced_before()
S
74 2 4
Omnisend_Sync_Manager::finish_products()
S
69 2 7
display_settings()
S
62 1 15
Omnisend_Sync_Manager::stop_categories()
S
71 2 6
Omnisend_Manager::delete_product_from_omnisend()
S
67 2 7
Omnisend_Sync_Manager::start_check_batches_if_not_started()
S
68 2 7
map_value_to_status()
S
80 2 3
Omnisend_Ajax::trigger_cart_push()
S
74 2 5
omnisend_cart_updated()
S
71 2 7
Omnisend_Sync_Manager::are_contacts_syncing()
S
71 2 6
Omnisend_Sync::was_order_synced_before()
S
73 2 4
omnisend_on_product_change()
S
69 2 7
Omnisend_Install::get_registration_url()
S
63 2 10
Omnisend_Install::notify_about_plugin_activation()
S
64 2 10
omnisend_deactivate()
S
72 2 6
omnisend_activation()
S
72 2 6
is_omnisend_cart_rebuild_url()
S
78 2 3
omnisend_product_picker()
S
68 2 8
omnisend_activated()
S
65 2 9
omnisend_declare_wc_hpos_compatibility()
S
71 2 5
omnisend_track_started_checkout_event()
S
65 2 8
get_menu_title()
S
74 2 4
Omnisend_Sync_Manager::is_categories_finished()
S
71 2 6
omnisend_category_delete()
S
73 2 6
omnisend_front_scripts_and_styles()
S
59 1 15
Omnisend_Sync_Manager::stop_contacts()
S
71 2 6
Omnisend_Sync_Manager::is_contacts_finished()
S
71 2 6
omnisend_order_updated()
S
73 2 6
omnisend_product_delete()
S
73 2 6
omnisend_display_api_access_notice()
S
71 2 7
omnisend_activate()
S
72 2 6
Omnisend_Server_Session::set()
S
68 2 7
omnisend_cron_schedules()
S
63 1 11
Omnisend_Sync_Manager::start_contacts()
S
77 1 4
Omnisend_Sync::delete_order_meta_data()
S
73 1 5
Omnisend_All_Sync_Stats::__construct()
S
69 1 7
Omnisend_Logger::info()
S
78 1 3
Omnisend_Settings::add_checkout_opt_in_text()
S
78 1 3
Omnisend_Sync::get_category_sync_status()
S
78 1 3
omnisend_add_plugin_settings_link()
S
71 1 5
omnisend_track_add_to_cart_event()
S
74 1 4
Omnisend_User_Storage::set_contact_id()
S
79 1 3
Omnisend_Sync::mark_order_sync_as_error()
S
79 1 3
omnisend_order_cancelled()
S
76 1 4
Omnisend_Helper::price_to_cents()
S
77 1 3
Omnisend_Settings::get_checkout_opt_in_preselected_status()
S
79 1 3
omnisend_on_user_register()
S
75 1 5
omnisend_setup_omnisend_settings()
S
68 1 7
Omnisend_Sync::get_order_meta_data()
S
74 1 4
omnisend_init_products_sync()
S
79 1 4
Omnisend_User_Storage::get_contact_id()
S
79 1 3
Omnisend_Sync_Manager::start_orders()
S
77 1 4
Omnisend_Settings::add_contact_tag()
S
78 1 3
omnisend_order_payment_failed()
S
76 1 4
omnisend_init_orders_sync()
S
79 1 4
omnisend_on_category_change()
S
74 1 5
Omnisend_Logger::error()
S
78 1 3
Omnisend_User_Storage::set()
S
66 1 7
Omnisend_Operation_Status::error()
S
79 1 3
Omnisend_Logs::get_last_log_id()
S
74 1 4
Omnisend_Content::get_prop()
S
75 1 4
Omnisend_Sync::mark_contact_as_error()
S
79 1 3
Omnisend_Operation_Status::__construct()
S
77 1 4
omnisend_init_categories_sync()
S
79 1 4
omnisend_order_pending()
S
76 1 4
display_plugin_version()
S
68 1 10
Omnisend_Sync_Manager::start_products()
S
77 1 4
Omnisend_Operation_Status::success()
S
79 1 3
Omnisend_Settings::add_contact_tag_status()
S
78 1 3
Omnisend_Settings::add_checkout_opt_in_preselected_status()
S
78 1 3
Omnisend_Sync::set_order_sync_status()
S
79 1 3
Omnisend_Settings::set_checkout_opt_in_text()
S
78 1 3
omnisend_order_completed()
S
76 1 4
Omnisend_Settings::get_brand_id()
S
79 1 3
Omnisend_Sync::get_order_sync_status()
S
79 1 3
Omnisend_Install::get_woo_api_keys()
S
69 1 6
is_omnisend_account_connected()
S
72 1 5
omnisend_init_contacts_sync()
S
79 1 4
Omnisend_Contact_Resolver::get_storage_key()
S
80 1 3
Omnisend_Logger::warning()
S
78 1 3
omnisend_display_omnisend_logo()
S
68 1 9
omnisend_wplogin()
S
78 1 4
Omnisend_Logger::disable_logging()
S
79 1 3
Omnisend_Sync::mark_contact_as_synced()
S
78 1 3
Omnisend_Logger::is_logging_enabled()
S
79 1 3
Omnisend_Helper::is_woocommerce_plugin_activated()
S
78 1 3
Omnisend_Helper::are_permalinks_correct()
S
75 1 4
Omnisend_Settings::set_checkout_opt_in_status()
S
78 1 3
Omnisend_Settings::set_checkout_opt_in_preselected_status()
S
78 1 3
Omnisend_Sync::mark_order_sync_as_synced()
S
78 1 3
Omnisend_Settings::set_contact_tag_status()
S
78 1 3
omnisend_order_processing()
S
76 1 4
Omnisend_Sync_Stats_Repository::get_product_stats()
S
80 1 3
Omnisend_Settings::get_contact_tag()
S
79 1 3
Omnisend_Sync_Stats_Repository::get_all_stats()
S
66 1 9
omnisend_notify_about_plugin_update()
S
83 1 3
Omnisend_Install::get_connecting_url()
S
70 1 6
Omnisend_Helper::omnisend_plugin_version()
S
71 1 5
Omnisend_Sync_Stats::__construct()
S
67 1 8
Omnisend_Sync::mark_order_sync_as_skipped()
S
79 1 3
Omnisend_Operation_Status::to_string()
S
68 1 8
Omnisend_Cart_Event::is_cart_valid()
S
80 1 3
Omnisend_Notifications::is_valid()
S
79 1 3
Omnisend_Sync::mark_category_sync_as_synced()
S
78 1 3
Omnisend_Sync_Stats_Repository::count_item()
S
71 1 5
omnisend_on_user_update()
S
75 1 5
Omnisend_Sync::update_order_meta_data()
S
72 1 5
Omnisend_Logger::get_logs()
S
71 1 5
Omnisend_Settings::is_status()
S
79 1 3
Omnisend_Sync_Manager::start_resync_contacts()
S
75 1 4
Omnisend_Manager_Assistant::init_sync()
S
72 1 6
Omnisend_Settings::set_logs_status()
S
78 1 3
Omnisend_Install::remove_woo_api_key()
S
71 1 5
Omnisend_Sync_Stats_Repository::get_user_count()
S
68 1 7
omnisend_order_payment_completed()
S
76 1 4
omnisend_under_marketing_notice_viewed()
S
75 1 5
Omnisend_Logger::get_all_logs()
S
75 1 4
omnisend_batch_check()
S
79 1 4
Omnisend_Logger::remove_all_logs()
S
75 1 4
omnisend_order_refunded()
S
76 1 4
Omnisend_Category::to_array()
S
72 1 6
omnisend_sync_logs()
S
83 1 3
Omnisend_Logger::enable_logging()
S
75 1 4
Omnisend_Connection_Error::get_message()
S
82 1 3
Omnisend_Settings::get_checkout_opt_in_text()
S
79 1 3
Omnisend_Settings::set_contact_tag()
S
78 1 3
Omnisend_Sync_Manager::start_categories()
S
77 1 4
omnisend_init_crons()
S
77 1 4
Omnisend_Settings::add_checkout_opt_in_status()
S
78 1 3
Omnisend_User_Storage::get_attribution_id()
S
79 1 3