Errors from "Envato Theme Check" plugin. Would this be rejected?

Hey guys,

I’m in a dilemma and not sure how to continue on this one. I’m on my way to submit my theme and did the Envato Checks with Envato Theme Check plugin and only have these 2 errors:

The first one:

REQUIRED: Found  **is_plugin_active(**  in the file  **includes/theme-plugins.php** . is_plugin_active() is not reliable. Use function_exists() or class_exists() instead.

Line 207: $plugins[ $slug ][ 'active' ] = $this->tgmpa->is_plugin_active( $slug );

I know perfectly well why i shouldn’t directly use is_plugin_active, however in my case, the plugin literally checks matches of is_plugin_active but in my code, i’m verifying with the TGMPA’s instance (eg: $this->tgmpa->is_plugin_active ), which is a library that’s loaded and in use (as well as this function). I know i can use class_exists but for this i need to get all plugin’s classes and it just feels redundant.

Second one:

* WARNING: Found  **remove_filter(**  in the file  **includes/theme-plugins.php** . Themes should not remove core filters. Ensure this is a valid use case.

Line 367: remove_filter( 'upgrader_source_selection', array( $this->tgmpa, 'maybe_adj

In this case, the code looks like this (it’s based on TGMPA’s process_bulk_actions method):

// Process the bulk installation submissions.
add_filter( 'upgrader_source_selection', array( $this->tgmpa, 'maybe_adjust_source_dir' ), 1, 3 );
$installed = $installer->bulk_install( $sources );
remove_filter( 'upgrader_source_selection', array( $this->tgmpa, 'maybe_adjust_source_dir' ), 1 );

In this case, again, i’m using TGMPA’s instance to make bulk plugin installs for the theme’s Install wizard which is Ajax based, but instead of reinventing the wheel, i’m simply using TGMPA library’s TGMPA_Bulk_Installer with a custom skin (that extends Bulk_Upgrader_Skin) to have a silent(er) process for the Ajax calls.

As the error says “Ensure this is a valid use case.”, i feel like it is a valid use case, so far i haven’t had any installation problems, but i would like to know if this would be a reason for rejecting the theme.

@StephenCronin @LoveThemes Would appreciate any input!!


1 Like

From my sense, of course, you need to pass all of off Envato Theme Check plugins issues

My common sense agrees 100% with that :blush:, however from a technical pov, i’m just making use of TGMPA library (which is accepted by Envato). I also looked into MerlinWP (which again is accepted by Envato) and it kind of does the same thing.

I have same issue. Our item just update but reject.
Our theme activate over 2 years ago and plugin Envato Theme check last version update 2 years ago. But now Envato team report new bug while i check with plugin Theme check update 4 week ago it still work well.

Any one have any idea?

@JanStudio Use this plugin to check your theme:

Envato Theme Check

As ‘Theme Check’ plugin you are referencing is generally used to check themes for before submission. But if you could pass check from that plugin, I’m sure there will be no issue with Envato Theme Check Plugin.

I submit update version of our theme it pass with Theme Check plugin but show more error with Envato Theme Check plugin

much issue come from TGMPA library.

2 weeks ago we submit update and our theme approved but current version just update CSS not pass. So funny with review team.

Could you provide a bit more informations?

I hope you’re using the latest version of TGMPA i.e 2.6.1
Which version of Envato Theme Check are you using??

@JanStudio you need to rename back class-tgmpa.php to class-tgm-plugin-activation.php because the Envato Theme Check is literally matching after “class-tgm-plugin-activation.php”.

I think I’ve found out the issue :slight_smile:

Please rename class-tgmpa.php to class-tgm-plugin-activation.php .

This will fix your issues.

@marusso same pinch man :slight_smile:

I didn’t see your reply :slightly_smiling_face:

@raw-themes :grin:

@raw-themes @marusso thanks, i change file class-tgmpa.php to class-tgm-plugin-activation.php and it solved problem related to TGMPA

@raw-themes I using version 2.6.1 of TGMPA and version 20180222 of Envato Theme Check.
Can you help me how to resolve this error

@JanStudio ,

On the first error, instead of removing the filter, try to add conditions in the filter’s function, or re-filter where you need to, and unset what was filtered first.

On 2nd and 3rd, again, instead of removing the filters, re-filter unsetting what you don’t need no more.

4th error, try using wp_kses's functions, such as wp_kses_post .

1 Like

@JanStudio Simply use aq resize file from your plugin. Also move your remove filter to your plugin code as well.

i have same issue