18F/18f.gsa.gov

View on GitHub
assets/js/lib/jquery.ajaxchimp.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function ajaxChimp has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.ajaxChimp = function (options) {
        $(this).each(function(i, elem) {
            var form = $(elem);
            var email = form.find('input[type=email]');
            var label = form.find('label[for=' + email.attr('id') + ']');
Severity: Major
Found in assets/js/lib/jquery.ajaxchimp.js - About 3 hrs to fix

    Function successCallback has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    function successCallback(resp) {
                        if (resp.result === 'success') {
                            msg = 'We have sent you a confirmation email';
                            label.removeClass('error').addClass('valid');
                            email.removeClass('error').addClass('valid');
    Severity: Minor
    Found in assets/js/lib/jquery.ajaxchimp.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status