90% template-kit-import

Code Review | Template Kit - Import

WordPress plugin Template Kit - Import scored90%from 54 tests.

About plugin

  • Plugin page: template-kit-import
  • Plugin version: 1.0.14
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: Jan 9, 2020
  • Latest release: Feb 28, 2022
  • Number of updates: 37
  • Update frequency: every 21.1 days
  • Top authors: Brad Davis (40.54%)envato (35.14%)dtbaker (29.73%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100,000+ active /428,564 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼2.82ms] Passed 4 tests

A check of server-side resources used by Template Kit - Import
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2937.99 ▲0.69
Dashboard /wp-admin3.63 ▲0.2945.17 ▼12.49
Posts /wp-admin/edit.php3.68 ▲0.3346.73 ▼0.18
Add New Post /wp-admin/post-new.php6.28 ▲0.4091.71 ▲0.72
Media Library /wp-admin/upload.php3.49 ▲0.2734.32 ▲2.50
Template Kit /wp-admin/tools.php?page=template-kit-import3.4630.70

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 120 new files
Database: no new tables, 8 new options
New WordPress options
template_kit_import_install_time
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
template_kit_import_version

Browser metrics Passed 4 tests

Checking browser requirements for Template Kit - Import
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.28 ▼0.882.17 ▲0.6140.47 ▼0.83
Dashboard /wp-admin2,210 ▲195.80 ▼0.1196.33 ▼5.9939.32 ▼0.96
Posts /wp-admin/edit.php2,096 ▲72.03 ▼0.0035.00 ▼1.5634.18 ▲1.08
Add New Post /wp-admin/post-new.php1,539 ▲623.50 ▲0.07572.99 ▼122.8247.10 ▼22.41
Media Library /wp-admin/upload.php1,398 ▲104.24 ▲0.04100.22 ▼6.1143.51 ▼1.20
Template Kit /wp-admin/tools.php?page=template-kit-import9042.4646.0742.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: Please take inspiration from this readme.txt

template-kit-import/template-kit-import.php Passed 13 tests

The main PHP script in "Template Kit - Import" version 1.0.14 is automatically included on every request by WordPress
33 characters long description:
Import Template Kits to WordPress

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 plugin5,498 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP295271,1142,217
JSX482271811,875
Sass2619031,140
SVG605165
JavaScript4146399
CSS2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity13.32
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes22
▷ Abstract classes418.18%
▷ Concrete classes1881.82%
▷ Final classes00.00%
Methods113
▷ Static methods21.77%
▷ Public methods10592.92%
▷ Protected methods10.88%
▷ Private methods76.19%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants12
▷ Global constants975.00%
▷ Class constants325.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.04MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/7b1453e570abffbb55937a53ebfc4e10.png37.58KB39.72KB0.00%