gocodebox/lifterlms

View on GitHub

Showing 309 of 1,394 total issues

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">
        <Path
            d="M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192h42.7c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0H21.3C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7h42.7C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3H405.3zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352H378.7C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7H154.7c-14.7 0-26.7-11.9-26.7-26.7z"
        />
Severity: Major
Found in src/blocks/memberships/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
        <Path
            d="M217.9 105.9L340.7 228.7c7.2 7.2 11.3 17.1 11.3 27.3s-4.1 20.1-11.3 27.3L217.9 406.1c-6.4 6.4-15 9.9-24 9.9c-18.7 0-33.9-15.2-33.9-33.9l0-62.1L32 320c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l128 0 0-62.1c0-18.7 15.2-33.9 33.9-33.9c9 0 17.6 3.6 24 9.9zM352 416l64 0c17.7 0 32-14.3 32-32l0-256c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c53 0 96 43 96 96l0 256c0 53-43 96-96 96l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z"
        />
Severity: Major
Found in src/blocks/login/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">
        <Path
            d="M320 376.4l.1-.1 26.4 14.1 85.2 45.5-16.5-97.6-4.8-28.7 20.7-20.5 70.1-69.3-96.1-14.2-29.3-4.3-12.9-26.6L320.1 86.9l-.1 .3V376.4zm175.1 98.3c2 12-3 24.2-12.9 31.3s-23 8-33.8 2.3L320.1 439.8 191.8 508.3C181 514 167.9 513.1 158 506s-14.9-19.3-12.9-31.3L169.8 329 65.6 225.9c-8.6-8.5-11.7-21.2-7.9-32.7s13.7-19.9 25.7-21.7L227 150.3 291.4 18c5.4-11 16.5-18 28.8-18s23.4 7 28.8 18l64.3 132.3 143.6 21.2c12 1.8 22 10.2 25.7 21.7s.7 24.2-7.9 32.7L470.5 329l24.6 145.7z"
        />
Severity: Major
Found in src/blocks/course-reviews/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                    {
                        attribute: 'disable_retake',
                        id: 'disable-retake',
                        label: LLMS.l10n.translate( 'Disable Retake' ),
                        tip: LLMS.l10n.translate( 'Prevent quiz retake after student passed the quiz.' ),
Severity: Major
Found in assets/js/builder/Schemas/Quiz.js and 2 other locations - About 50 mins to fix
assets/js/builder/Schemas/Lesson.js on lines 35..41
assets/js/builder/Schemas/Quiz.js on lines 59..65

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                    {
                        attribute: 'show_correct_answer',
                        id: 'show-correct-answer',
                        label: LLMS.l10n.translate( 'Show Correct Answers' ),
                        tip: LLMS.l10n.translate( 'When enabled, students will be shown the correct answer to any question they answered incorrectly.' ),
Severity: Major
Found in assets/js/builder/Schemas/Quiz.js and 2 other locations - About 50 mins to fix
assets/js/builder/Schemas/Lesson.js on lines 35..41
assets/js/builder/Schemas/Quiz.js on lines 76..82

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
        <Path
            d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"
        />
Severity: Major
Found in src/blocks/course-meta-info/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
        <Path
            d="M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"
        />
Severity: Major
Found in src/blocks/navigation-link/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">
        <Path
            d="M224 0a128 128 0 1 1 0 256A128 128 0 1 1 224 0zM178.3 304h91.4c11.8 0 23.4 1.2 34.5 3.3c-2.1 18.5 7.4 35.6 21.8 44.8c-16.6 10.6-26.7 31.6-20 53.3c4 12.9 9.4 25.5 16.4 37.6s15.2 23.1 24.4 33c15.7 16.9 39.6 18.4 57.2 8.7v.9c0 9.2 2.7 18.5 7.9 26.3H29.7C13.3 512 0 498.7 0 482.3C0 383.8 79.8 304 178.3 304zM436 218.2c0-7 4.5-13.3 11.3-14.8c10.5-2.4 21.5-3.7 32.7-3.7s22.2 1.3 32.7 3.7c6.8 1.5 11.3 7.8 11.3 14.8v30.6c7.9 3.4 15.4 7.7 22.3 12.8l24.9-14.3c6.1-3.5 13.7-2.7 18.5 2.4c7.6 8.1 14.3 17.2 20.1 27.2s10.3 20.4 13.5 31c2.1 6.7-1.1 13.7-7.2 17.2l-25 14.4c.4 4 .7 8.1 .7 12.3s-.2 8.2-.7 12.3l25 14.4c6.1 3.5 9.2 10.5 7.2 17.2c-3.3 10.6-7.8 21-13.5 31s-12.5 19.1-20.1 27.2c-4.8 5.1-12.5 5.9-18.5 2.4l-24.9-14.3c-6.9 5.1-14.3 9.4-22.3 12.8l0 30.6c0 7-4.5 13.3-11.3 14.8c-10.5 2.4-21.5 3.7-32.7 3.7s-22.2-1.3-32.7-3.7c-6.8-1.5-11.3-7.8-11.3-14.8V454.8c-8-3.4-15.6-7.7-22.5-12.9l-24.7 14.3c-6.1 3.5-13.7 2.7-18.5-2.4c-7.6-8.1-14.3-17.2-20.1-27.2s-10.3-20.4-13.5-31c-2.1-6.7 1.1-13.7 7.2-17.2l24.8-14.3c-.4-4.1-.7-8.2-.7-12.4s.2-8.3 .7-12.4L343.8 325c-6.1-3.5-9.2-10.5-7.2-17.2c3.3-10.6 7.7-21 13.5-31s12.5-19.1 20.1-27.2c4.8-5.1 12.4-5.9 18.5-2.4l24.8 14.3c6.9-5.1 14.5-9.4 22.5-12.9V218.2zm92.1 133.5a48.1 48.1 0 1 0 -96.1 0 48.1 48.1 0 1 0 96.1 0z"
        />
Severity: Major
Found in src/blocks/my-account/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
        <Path
            d="M400 0H176c-26.5 0-48.1 21.8-47.1 48.2c.2 5.3 .4 10.6 .7 15.8H24C10.7 64 0 74.7 0 88c0 92.6 33.5 157 78.5 200.7c44.3 43.1 98.3 64.8 138.1 75.8c23.4 6.5 39.4 26 39.4 45.6c0 20.9-17 37.9-37.9 37.9H192c-17.7 0-32 14.3-32 32s14.3 32 32 32H384c17.7 0 32-14.3 32-32s-14.3-32-32-32H357.9C337 448 320 431 320 410.1c0-19.6 15.9-39.2 39.4-45.6c39.9-11 93.9-32.7 138.2-75.8C542.5 245 576 180.6 576 88c0-13.3-10.7-24-24-24H446.4c.3-5.2 .5-10.4 .7-15.8C448.1 21.8 426.5 0 400 0zM48.9 112h84.4c9.1 90.1 29.2 150.3 51.9 190.6c-24.9-11-50.8-26.5-73.2-48.3c-32-31.1-58-76-63-142.3zM464.1 254.3c-22.4 21.8-48.3 37.3-73.2 48.3c22.7-40.3 42.8-100.5 51.9-190.6h84.4c-5.1 66.3-31.1 111.2-63 142.3z"
        />
Severity: Major
Found in src/blocks/my-achievements/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                    {
                        attribute: 'free_lesson',
                        id: 'free-lesson',
                        label: LLMS.l10n.translate( 'Free Lesson' ),
                        tip: LLMS.l10n.translate( 'Free lessons can be accessed without enrollment.' ),
Severity: Major
Found in assets/js/builder/Schemas/Lesson.js and 2 other locations - About 50 mins to fix
assets/js/builder/Schemas/Quiz.js on lines 59..65
assets/js/builder/Schemas/Quiz.js on lines 76..82

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">
        <Path
            d="M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9v28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5V291.9c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z"
        />
Severity: Major
Found in src/blocks/courses/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
        <Path
            d="M448 160H320V128H448v32zM48 64C21.5 64 0 85.5 0 112v64c0 26.5 21.5 48 48 48H464c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48H48zM448 352v32H192V352H448zM48 288c-26.5 0-48 21.5-48 48v64c0 26.5 21.5 48 48 48H464c26.5 0 48-21.5 48-48V336c0-26.5-21.5-48-48-48H48z"
        />
Severity: Major
Found in src/blocks/course-continue/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">
        <Path d="M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM504 312V248H440c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V136c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H552v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"
        />
    </SVG>
Severity: Major
Found in src/blocks/registration/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">
        <Path
            d="M592 416H48c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48h544c26.5 0 48 21.5 48 48v224c0 26.5-21.5 48-48 48z"
        />
Severity: Major
Found in src/blocks/access-plan-button/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG
        className="llms-block-icon"
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 512 512">
Severity: Major
Found in src/blocks/course-syllabus/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            $( '#llms-apply-coupon' ).on( 'click', function( e ) {

                e.preventDefault();
                self.coupon_apply( $( this ) );

Severity: Minor
Found in assets/js/llms-form-checkout.js and 1 other location - About 50 mins to fix
assets/js/llms-quiz.js on lines 397..400

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            $( '#llms-next-question, #llms-complete-quiz' ).on( 'click', function( e ) {
                e.preventDefault();
                self.answer_question( $( this ) );
            } );
Severity: Minor
Found in assets/js/llms-quiz.js and 1 other location - About 50 mins to fix
assets/js/llms-form-checkout.js on lines 179..184

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

        return array(
            array(
                'class'             => 'llms-select2',
                'custom_attributes' => array(
                    'data-allow-clear' => true,
includes/notifications/controllers/class.llms.notification.controller.purchase.receipt.php on lines 165..180
includes/notifications/controllers/class.llms.notification.controller.quiz.graded.php on lines 106..120
includes/notifications/controllers/class.llms.notification.controller.quiz.passed.php on lines 119..133
includes/notifications/controllers/class.llms.notification.controller.student.welcome.php on lines 140..154
includes/notifications/controllers/class.llms.notification.controller.upcoming.payment.reminder.php on lines 449..463

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    array(
                        'data_attributes' => array(
                            'post-type'     => 'llms_membership',
                            'post-statuses' => 'publish,draft,future',
                            'placeholder'   => __( 'Memberships', 'lifterlms' ),
includes/admin/post-types/meta-boxes/class.llms.meta.box.voucher.php on lines 66..79

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

        return array(
            array(
                'class'             => 'llms-select2',
                'custom_attributes' => array(
                    'data-allow-clear' => true,
includes/notifications/controllers/class.llms.notification.controller.purchase.receipt.php on lines 165..180
includes/notifications/controllers/class.llms.notification.controller.quiz.failed.php on lines 118..132
includes/notifications/controllers/class.llms.notification.controller.quiz.graded.php on lines 106..120
includes/notifications/controllers/class.llms.notification.controller.student.welcome.php on lines 140..154
includes/notifications/controllers/class.llms.notification.controller.upcoming.payment.reminder.php on lines 449..463

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language