83% toolkit-for-envato

Code Review | Envato Toolkit

WordPress plugin Envato Toolkit scored83%from 54 tests.

About plugin

  • Plugin page: toolkit-for-envato
  • Plugin version: 1.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: Apr 26, 2021
  • Number of updates: 24
  • Update frequency: every 58.5 days
  • Top authors: KestutisIT (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10,000+ active /119,469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼8.90ms] Passed 4 tests

Server-side resources used by Envato Toolkit
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.1248.44 ▲1.40
Dashboard /wp-admin3.71 ▲0.0752.57 ▼20.98
Posts /wp-admin/edit.php3.76 ▲0.0851.17 ▼5.94
Add New Post /wp-admin/post-new.php6.22 ▲0.0892.20 ▼9.96
Media Library /wp-admin/upload.php3.57 ▲0.0841.22 ▲1.27

Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Envato Toolkit
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.73 ▲0.361.96 ▲0.1343.81 ▲1.41
Dashboard /wp-admin2,207 ▲335.65 ▲0.0386.87 ▼13.6143.03 ▼9.87
Posts /wp-admin/edit.php2,109 ▲122.05 ▼0.0035.62 ▼0.5133.21 ▼3.15
Add New Post /wp-admin/post-new.php1,555 ▲2923.37 ▲5.99594.12 ▼124.7252.07 ▲2.37
Media Library /wp-admin/upload.php1,403 ▲64.23 ▼0.0398.94 ▼2.9940.36 ▼8.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/toolkit-for-envato/EnvatoToolkit.php
    • > /wp-content/plugins/toolkit-for-envato/Templates/template.SearchResults.php
    • > /wp-content/plugins/toolkit-for-envato/Templates/template.SearchInput.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: validation, marketplace, license, api, update checker...

toolkit-for-envato/EnvatoToolkit.php 69% from 13 tests

The entry point to "Envato Toolkit" version 1.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("/Languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("toolkit-for-envato.php" instead of "EnvatoToolkit.php")
  • Description: The description should be shorter than 140 characters (currently 450 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,646 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP112835091,535
CSS1316111

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity31.12
▷ Minimum class complexity6.00
▷ Maximum class complexity95.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes337.50%
Methods94
▷ Static methods11.06%
▷ Public methods8590.43%
▷ Protected methods44.26%
▷ Private methods55.32%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected