woothemes/woocommerce

View on GitHub
assets/js/zoom/jquery.zoom.js

Summary

Maintainability
C
1 day
Test Coverage

Function zoom has 127 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.zoom = function (options) {
        return this.each(function () {
            var
            settings = $.extend({}, defaults, options || {}),
            //target will display the zoomed image
Severity: Major
Found in assets/js/zoom/jquery.zoom.js - About 5 hrs to fix

    Function onload has 93 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                img.onload = function () {
                    var zoom = $.zoom(target, source, img, settings.magnify);
    
                    function start(e) {
                        zoom.init();
    Severity: Major
    Found in assets/js/zoom/jquery.zoom.js - About 3 hrs to fix

      Function zoom has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.zoom = function(target, source, img, magnify) {
              var targetHeight,
                  targetWidth,
                  sourceHeight,
                  sourceWidth,
      Severity: Major
      Found in assets/js/zoom/jquery.zoom.js - About 2 hrs to fix

        There are no issues that match your filters.

        Category
        Status