Make WordPress Themes

Opened 3 months ago

Closed 3 months ago

#287673 closed theme (not-approved)

THEME: FlexNews – 1.1

Reported by: creativthemes Owned by: fahimmurshed
Priority: new theme Keywords: theme-flexnews
Cc: creativthemes@…

Description

FlexNews - 1.0

FlexNews is a fast, clean, and modern-looking responsive magazine WordPress theme. This theme can be applicable for news, magazine, blog, online news publishing sites, or any kind of content publishing site.

Theme URL - ​https://creativthemes.com/flexnews/
Author URL - ​https://creativthemes.com/

Trac Browser - https://themes.trac.wordpress.org/browser/flexnews/1.0
WordPress.org - ​https://wordpress.org/themes/flexnews/

SVN - ​https://themes.svn.wordpress.org/flexnews/1.0
ZIP - ​https://downloads.wordpress.org/theme/flexnews.1.0.zip?nostats=1
Live preview – ​https://playground.wordpress.net/#…

History:

Ticket Summary Status Resolution Owner
#287673 THEME: FlexNews – 1.1 closed not-approved fahimmurshed

(this ticket)

#289301 THEME: FlexNews – 1.2 closed live bijayyadav


https://themes.svn.wordpress.org/flexnews/1.0/screenshot.png
Theme Check Results:

  • RECOMMENDED: No reference to register_block_pattern was found in the theme. Theme authors are encouraged to implement custom block patterns as a transition to block themes.
  • RECOMMENDED: No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
  • RECOMMENDED: No reference to add_theme_support( "custom-header", $args ) was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.
  • RECOMMENDED: No reference to add_theme_support( "responsive-embeds" ) was found in the theme. It is recommended that the theme implement this functionality.

Change History (4)

#1 @themetracbot
3 months ago

  • Summary THEME: FlexNews – 1.0 → THEME: FlexNews – 1.1

FlexNews - 1.1

FlexNews is a fast, clean, and modern-looking responsive magazine WordPress theme. This theme can be applicable for news, magazine, blog, online news publishing sites, or any kind of content publishing site.

Theme URL - ​https://creativthemes.com/flexnews/
Author URL - ​https://creativthemes.com/

Trac Browser - https://themes.trac.wordpress.org/browser/flexnews/1.1
WordPress.org - ​https://wordpress.org/themes/flexnews/

SVN - ​https://themes.svn.wordpress.org/flexnews/1.1
ZIP - ​https://downloads.wordpress.org/theme/flexnews.1.1.zip?nostats=1
Live preview – ​https://playground.wordpress.net/#…

Diff with previous version: [345520] https://themes.trac.wordpress.org/changeset?old_path=flexnews/1.0&new_path=flexnews/1.1

History:

Ticket Summary Status Resolution Owner
#287673 THEME: FlexNews – 1.1 closed not-approved fahimmurshed

(this ticket)

#289301 THEME: FlexNews – 1.2 closed live bijayyadav


https://themes.svn.wordpress.org/flexnews/1.1/screenshot.png
Theme Check Results:

  • RECOMMENDED: No reference to register_block_pattern was found in the theme. Theme authors are encouraged to implement custom block patterns as a transition to block themes.
  • RECOMMENDED: No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
  • RECOMMENDED: No reference to add_theme_support( "responsive-embeds" ) was found in the theme. It is recommended that the theme implement this functionality.

#2 @fahimmurshed
3 months ago

  • Owner set to fahimmurshed
  • Status new → reviewing

#3 @creativthemes
3 months ago

Hello @fahimmurshed,

It has been 6 days. Are you going to review this theme?

Thank you.

#4 @fahimmurshed
3 months ago

  • Resolution → not-approved
  • Status reviewing → closed

Hello @creativthemes,

Fix the warnings.

<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /Users/fahim/Studio/themecheck/wp-content/themes/flexnews/inc/extras.php:126) in <b>/Users/fahim/Studio/themecheck/wp-includes/functions.php</b> on line <b>7310</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /Users/fahim/Studio/themecheck/wp-content/themes/flexnews/inc/extras.php:126) in <b>/Users/fahim/Studio/themecheck/wp-admin/customize.php</b> on line <b>104</b><br />

Can't access the customizer page

https://i.imgur.com/e6yjxuA.png

Issue 1: Remotely Enqueued Google Fonts Violates Privacy Policy

  • File: functions.php Lines 256, 270, 303
  • Code Reference:
    // Line 256:
    $fonts_url = add_query_arg( array(
        'family' => urlencode( implode( '|', $fonts ) ),
        'subset' => urlencode( $subsets ),
    ), 'https://fonts.googleapis.com/css' );
    
    // Line 270:
    wp_enqueue_style( 'flexnews-google-fonts', $fonts_url, array(), null );
    
    // Line 303:
    wp_enqueue_style( 'flexnews-fonts', flexnews_fonts_url(), array(), null );
    
  • Guideline Violation: ​Section 8: Privacy and user consent

    "Themes must not make requests to external domains and external services that could send user-identifying data without explicit user consent."
    "All Google Fonts must be hosted locally within the theme folder. Remotely hosted Google Fonts from fonts.googleapis.com or fonts.gstatic.com are NOT allowed."

  • Explanation: Under the official WordPress.org Theme Review guidelines, themes are strictly prohibited from loading Google Fonts remotely from fonts.googleapis.com because visitors' IP addresses are shared without prior consent. All fonts must either be self-hosted locally (e.g. bundled .woff2 files using @font-face in CSS) or rely on system font stacks.
  • Required Fix: Download the required Poppins font weights (.woff2) into an assets/fonts/ directory and enqueue them via a local stylesheet using @font-face, or remove the remote Google Fonts request.

Issue 2: Missing and Incomplete Resource Credits in readme.txt

  • File: readme.txt Lines 21-76 & 93-97
  • Guideline Violation: ​Section 1: Licensing & Copyright & ​Section 9: Files - Readme.txt

    "Include license, copyright information, and source for all resources included, such as fonts or images."
    "All information must be documented in one file: readme.txt. Do not provide this information in other files, such as license.txt."
    "Provide a list of all resources in one file under == Resources ==."
    "For all images, specify: 1. Source URL, 2. Author / Creator, 3. License name and license URL."

  • Issues Detected:
    1. Poppins Font Uncredited: The Poppins font (enqueued in functions.php:249) is not credited anywhere in readme.txt.
    2. Missing Photographer / Creator Names: Lines 34-75 list 10 PxHere images used in screenshot.png, but none of them list the creator/photographer name.
    3. Non-Standard Section Placement: Screenshot image credits are placed under a custom header == Image for theme screenshot ==, and Font Awesome is placed under == Copyright ==. All third-party assets must be consolidated under == Resources ==.
  • Required Fix: Consolidate all third-party libraries, fonts, and screenshot artwork under a single == Resources == heading with source, creator, and license URLs.

Issue 3: Missing Archive Title and Description in archive.php

  • File: archive.php Lines 13-38
  • Guideline Violation: ​Section 10: Classic Themes - Template Hierarchy

    "Archive pages (archive.php, category.php, tag.php, author.php, date.php) must display the archive title (e.g. the_archive_title()) and description (the_archive_description())."

  • Explanation: In archive.php, there is no call to the_archive_title() or the_archive_description(). Although functions.php:313 adds a filter to get_the_archive_title, the function the_archive_title() is never invoked! When visitors view category, tag, author, or date archives, there is no heading indicating what archive is being viewed.
  • Required Fix: Add the standard header block inside archive.php before the posts loop:
    <header class="page-header">
        <?php
        the_archive_title( '<h1 class="page-title">', '</h1>' );
        the_archive_description( '<div class="archive-description">', '</div>' );
        ?>
    </header><!-- .page-header -->
    

Issue 4: Missing Page Title in template-parts/content-page.php

  • File: template-parts/content-page.php Lines 12-23
  • Guideline Violation: ​Section 10: Classic Themes & ​Section 4: Code - Headings
  • Explanation: template-parts/content-page.php renders static pages (page.php). However, it never outputs the_title() or an <h1> heading. Any regular WordPress page created by the user displays body content without a title heading.
  • Required Fix: Add the title header to template-parts/content-page.php:
    <header class="entry-header">
        <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    </header><!-- .entry-header -->
    

Issue 5: Missing Search Heading on search.php

  • File: search.php Lines 11-16
  • Guideline Violation: ​Section 10: Classic Themes
  • Explanation: search.php directly outputs the loop without an <h1> or <header class="page-header"> indicating the user's search query. Users have no confirmation of what query was executed.
  • Required Fix: Add the search query heading inside search.php:
    <header class="page-header">
        <h1 class="page-title">
            <?php
            /* translators: %s: search query. */
            printf( esc_html__( 'Search Results for: %s', 'flexnews' ), '<span>' . esc_html( get_search_query() ) . '</span>' );
            ?>
        </h1>
    </header><!-- .page-header -->
    

Issue 6: Overriding Core posts_per_page Setting in pre_get_posts

  • File: functions.php Lines 320-349
  • Code Reference:
    function flexnews_recent_posts_per_page( $query ) {
        if ( is_admin() || ! $query->is_main_query() ) {
            return;
        }
        if ( $query->is_home() || $query->is_archive() ) {
            $recent_posts_number = get_theme_mod( 'recent_posts_number', get_option( 'posts_per_page', 10 ) );
            $query->set( 'posts_per_page', absint( $recent_posts_number ) );
        }
    }
    add_action( 'pre_get_posts', 'flexnews_recent_posts_per_page' );
    
  • Guideline Violation: ​Section 4: Code - Query manipulation

    "Do not override the global posts_per_page setting using pre_get_posts or query_posts() for the blog posts page or archive pages, as this overrides the user's Reading Settings (Settings > Reading)."

  • Explanation: WordPress core already gives the site owner control over how many posts appear on blog and archive pages under Settings > Reading > Blog pages show at most X posts. Themes must not override the main query's posts_per_page setting with a theme mod.
  • Required Fix: Remove function flexnews_recent_posts_per_page and its pre_get_posts hook from functions.php.

2. Warnings & Code Quality Recommendations

Warning 1: Unbounded get_posts Query in inc/customizer/sanitize.php

  • File: inc/customizer/sanitize.php Lines 48-57
  • Code Reference:
    function flexnews_dropdown_posts() {
        $posts = get_posts( array( 'numberposts' => -1 ) );
        ...
    }
    
  • Explanation: numberposts => -1 queries every post in the database. On websites with thousands of posts, this causes memory exhaustion (Fatal error: Allowed memory size exhausted) and customizer crashes. Furthermore, flexnews_dropdown_posts is never called anywhere in the theme.
  • Recommendation: Remove the unused flexnews_dropdown_posts() function.

Warning 2: Unescaped Output in Footer Section

  • File: inc/hook/custom.php Lines 286-289
  • Code Reference:
    $powered_by_text = sprintf( __( ' Theme FlexNews by %s', 'flexnews' ), '<a target="_blank" rel="designer" href="'. esc_url( 'http://creativthemes.com/' ) .'">Creativ Themes</a>' );
    ...
    <span class="copy-right"><?php echo esc_html($copyright_footer);?><?php echo $powered_by_text;?></span>
    
  • Explanation: $powered_by_text contains HTML markup and is printed with raw echo without late escaping. Also, http://creativthemes.com/ uses unencrypted HTTP.
  • Recommendation: Use wp_kses_post() and update to HTTPS:
    <?php echo wp_kses_post( $powered_by_text ); ?>
    

Warning 3: wp_body_open Hook Call in header.php

  • File: header.php Line 32
  • Code Reference:
    <?php do_action( 'wp_body_open' ); ?>
    
  • Recommendation: Since WordPress 5.2, themes should use the core function wp_body_open();:
    <?php wp_body_open(); ?>
    

Warning 4: Hardcoded <h1> for Site Title Across All Views

  • File: inc/hook/custom.php Lines 54-56
  • Explanation: The site title is rendered inside <h1 class="site-title"> on all pages, including single post and page templates. On single posts and static pages, the post/page title should be the primary <h1>, while the site title should use a <p> or <div> tag.
  • Recommendation: Wrap the site title in <h1> only if is_front_page() && is_home(), otherwise use <p class="site-title">.

Warning 5: Inaccessible Dropdown Toggle and Search Buttons

  • Files & Lines:
    • assets/js/custom.js Line 32:
      $('<button class="dropdown-toggle"><i class="fas fa-caret-down"></i></button>')
      
    • searchform.php Line 15:
      <button type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'flexnews' ) ?>"><i class="fas fa-search"></i></button>
      
  • Explanation: Both buttons contain only an icon element (<i>) without accessible text or aria-label. Screen readers cannot identify the purpose of the buttons.
  • Recommendation: Add <span class="screen-reader-text"><?php esc_html_e( 'Search', 'flexnews' ); ?></span> inside the search submit button, and add aria-label / aria-expanded to the dynamic dropdown toggle button.

Warning 6: Front Page News Sections Repeat on Paginated Blog Pages

  • File: index.php Lines 18-20, 29, 115
  • Explanation: The five front-page sections (breaking-news, featured-news, news-columns, category-news-showcase, most-read) are included on index.php without checking ! is_paged(). When visitors navigate to /page/2/, all five sections are loaded again above the paginated posts.
  • Recommendation: Wrap the front page sections in if ( ! is_paged() ) : ... endif;.
Note: See TracTickets for help on using tickets.