Shramkoweb/Portfolio

View on GitHub

Showing 89 of 89 total issues

Function AboutPage has 369 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function AboutPage() {
  return (
    <>
      <Head>
        <title>About | Serhii Shramko</title>
Severity: Major
Found in pages/about.tsx - About 1 day to fix

    Function QuizletPage has 267 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function QuizletPage() {
      return (
        <>
          <Head>
            <title>Quizlet QuickList - Chrome Extension</title>
    Severity: Major
    Found in pages/quizlet-list/index.tsx - About 1 day to fix

      Function ArticlePage has 178 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function ArticlePage(props: ArticlePageProps) {
        const {
          content,
          data: {
            title,
      Severity: Major
      Found in pages/blog/[slug].tsx - About 7 hrs to fix

        Function PrivacyPolicy has 169 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function PrivacyPolicy() {
          return (
            <>
              <Head>
                <title>Privacy Policy | Quizlet QuickList Chrome Extension</title>
        Severity: Major
        Found in pages/quizlet-list/privacy-policy.tsx - About 6 hrs to fix

          Function IndexPage has 161 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function IndexPage(props: IndexPageProps) {
            const { featuredPosts, otherPosts } = props;
          
            const [isAvatarHovered, setIsAvatarHovered] = useState(false);
          
          
          Severity: Major
          Found in pages/index.tsx - About 6 hrs to fix

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

            function GearPage() {
              return (
                <>
                  <Head>
                    <title>Gear | Serhii Shramko</title>
            Severity: Major
            Found in pages/gear.tsx - About 5 hrs to fix

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

                      <div className="relative w-full mb-4">
                        <input
                          aria-label="Search articles"
                          type="text"
                          placeholder="Search articles"
              Severity: Major
              Found in pages/blog/category/[category].tsx and 1 other location - About 5 hrs to fix
              pages/blog/index.tsx on lines 68..90

              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 136.

              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

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

                      <div className="relative w-full mb-4">
                        <input
                          aria-label="Search articles"
                          type="text"
                          placeholder="Search articles"
              Severity: Major
              Found in pages/blog/index.tsx and 1 other location - About 5 hrs to fix
              pages/blog/category/[category].tsx on lines 75..97

              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 136.

              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

              File about.tsx has 376 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import Head from 'next/head';
              import Image from 'next/image';
              
              import about from '../public/static/images/about.jpeg';
              import aboutBottom from '../public/static/images/about-bottom.png';
              Severity: Minor
              Found in pages/about.tsx - About 5 hrs to fix

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

                        <ul className="flex flex-col space-y-4">
                          <li>
                            <Link
                              href="/"
                              className="text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
                Severity: Major
                Found in components/footer/footer.tsx and 1 other location - About 4 hrs to fix
                components/footer/footer.tsx on lines 54..80

                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 125.

                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

                        <ul className="flex flex-col space-y-4">
                          <li>
                            <Link
                              href="/gear"
                              className="text-gray-600 transition-colors hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
                Severity: Major
                Found in components/footer/footer.tsx and 1 other location - About 4 hrs to fix
                components/footer/footer.tsx on lines 13..38

                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 125.

                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

                    test('worthless', () => {
                      window.gtag = jest.fn();
                      render(<PostReaction />);
                
                      const worthlessReactionButton = screen.getByRole('button', {
                Severity: Major
                Found in components/post-reaction/post-reaction.test.tsx and 1 other location - About 3 hrs to fix
                components/post-reaction/post-reaction.test.tsx on lines 35..49

                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 114.

                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

                    test('helpful', () => {
                      window.gtag = jest.fn();
                      render(<PostReaction />);
                
                      const worthlessReactionButton = screen.getByRole('button', {
                Severity: Major
                Found in components/post-reaction/post-reaction.test.tsx and 1 other location - About 3 hrs to fix
                components/post-reaction/post-reaction.test.tsx on lines 19..33

                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 114.

                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

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

                function BlogPage(props: BlogPageProps) {
                  const { posts, categories } = props;
                  const postsLength = posts.length;
                
                  const [searchValue, setSearchValue] = useState('');
                Severity: Major
                Found in pages/blog/index.tsx - About 3 hrs to fix

                  Function CategoryPage has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function CategoryPage(props: CategoryPageProps) {
                    const {
                      posts, categories, category, seoDescription, seoKeywords, seoTitle,
                    } = props;
                    const postsLength = posts.length;
                  Severity: Major
                  Found in pages/blog/category/[category].tsx - About 3 hrs to fix

                    Function SnippetPage has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function SnippetPage(props: SnippetPageProps) {
                      const {
                        content,
                        slug,
                        data: {
                    Severity: Major
                    Found in pages/snippets/[slug].tsx - About 3 hrs to fix

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

                                  <ul className="flex flex-col gap-2">
                                    <li>
                                      <TwitterShare />
                                    </li>
                                    <li>
                      Severity: Major
                      Found in pages/blog/[slug].tsx and 1 other location - About 3 hrs to fix
                      pages/blog/[slug].tsx on lines 192..205

                      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 101.

                      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

                                  <ul className="flex gap-2">
                                    <li>
                                      <TwitterShare />
                                    </li>
                                    <li>
                      Severity: Major
                      Found in pages/blog/[slug].tsx and 1 other location - About 3 hrs to fix
                      pages/blog/[slug].tsx on lines 104..117

                      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 101.

                      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

                      Function Footer has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function Footer() {
                        return (
                          <footer role="contentinfo" className="mx-auto flex w-full max-w-3xl flex-col items-start justify-center">
                            <hr className="mb-8 w-full border-gray-200 border-1 dark:border-gray-800" />
                            <div className="grid w-full max-w-3xl grid-cols-1 gap-4 pb-12 sm:grid-cols-3">
                      Severity: Major
                      Found in components/footer/footer.tsx - About 3 hrs to fix

                        Function MobileMenu has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function MobileMenu() {
                          const [isMenuOpen, setIsMenuOpen] = useState(false);
                          const router = useRouter();
                        
                          useEffect(() => {
                        Severity: Major
                        Found in components/mobile-menu/mobile-menu.tsx - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language