78% templatesnext-toolkit

Code Review | TemplatesNext ToolKit

WordPress plugin TemplatesNext ToolKit scored78%from 54 tests.

About plugin

  • Plugin page: templatesnext-too...
  • Plugin version: 3.2.9
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2014
  • Latest release: Jan 17, 2023
  • Number of updates: 108
  • Update frequency: every 27.2 days
  • Top authors: marsian (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10,000+ active /553,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.28MB] [CPU: ▲0.26ms] Passed 4 tests

Analyzing server-side resources used by TemplatesNext ToolKit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.79 ▲1.2951.10 ▲6.90
Dashboard /wp-admin4.66 ▲1.2866.36 ▼3.18
Posts /wp-admin/edit.php4.71 ▲1.3159.40 ▲1.65
Add New Post /wp-admin/post-new.php7.22 ▲1.2998.85 ▼4.34
Media Library /wp-admin/upload.php4.52 ▲1.2555.61 ▲19.87
Dashboard /wp-admin/plugins.php?page=meta-box4.6143.90
Add New /wp-admin/post-new.php?post_type=team4.7684.34
Testimonial Categories /wp-admin/edit-tags.php?taxonomy=testimonials-category&post_type=testimonials4.5147.59
Add New /wp-admin/post-new.php?post_type=itrans-slider4.7667.97
Portfolio /wp-admin/edit.php?post_type=portfolio4.6252.12
Add New /wp-admin/post-new.php?post_type=testimonials4.7662.58
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio-category&post_type=portfolio4.5146.78
Testimonials /wp-admin/edit.php?post_type=testimonials4.6249.03
itrans Slider Categories /wp-admin/edit-tags.php?taxonomy=itrans-slider-category&post_type=itrans-slider4.5144.38
Add New /wp-admin/post-new.php?post_type=portfolio4.7361.93

Server storage [IO: ▲2.00MB] [DB: ▲0.05MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 390 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_widget-advert-grid
widget_nx-widget-recent-posts
widget_nx-widget-portfolio-grid
widget_widget-nx-image
can_compress_scripts
db_upgraded
widget_nx-widget-recent-comments
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by TemplatesNext ToolKit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,402 ▲1,65614.05 ▼0.1315.86 ▲14.1643.75 ▼1.78
Dashboard /wp-admin3,514 ▲1,3345.96 ▲0.4292.69 ▼2.4641.47 ▼4.90
Posts /wp-admin/edit.php3,401 ▲1,3012.57 ▲0.6042.90 ▲4.3333.36 ▼3.57
Add New Post /wp-admin/post-new.php2,791 ▲1,25423.68 ▲5.21714.49 ▲73.4438.96 ▼33.66
Media Library /wp-admin/upload.php2,698 ▲1,2984.52 ▲0.34118.17 ▲11.5847.15 ▼1.00
Dashboard /wp-admin/plugins.php?page=meta-box3,0259.34317.1579.04
Add New /wp-admin/post-new.php?post_type=team8,6829.83253.6166.63
Testimonial Categories /wp-admin/edit-tags.php?taxonomy=testimonials-category&post_type=testimonials2,5782.4136.2032.64
Add New /wp-admin/post-new.php?post_type=itrans-slider8,6229.85268.3058.78
Portfolio /wp-admin/edit.php?post_type=portfolio2,3712.3639.5027.01
Add New /wp-admin/post-new.php?post_type=testimonials8,6359.82232.0061.13
Portfolio Categories /wp-admin/edit-tags.php?taxonomy=portfolio-category&post_type=portfolio2,5782.2236.6330.57
Testimonials /wp-admin/edit.php?post_type=testimonials2,3712.3738.8026.98
itrans Slider Categories /wp-admin/edit-tags.php?taxonomy=itrans-slider-category&post_type=itrans-slider2,5752.2337.6830.66
Add New /wp-admin/post-new.php?post_type=portfolio8,6329.52221.6057.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 11 options in the database
    • widget_widget-nx-image
    • widget_nx-widget-recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_nx-widget-recent-comments
    • widget_recent-comments
    • widget_nx-widget-portfolio-grid
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_widget-advert-grid
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/templates/media.php
    • > /wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/templates/video.php
    • > /wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/templates/upload.php
    • > /wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/templates/image-advanced.php
    • > /wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/templates/audio.php
  • 97× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/templatesnext-toolkit/inc/pb-widgets/widget-team.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/about/sections/review.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/fields/map.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/templatesnext-toolkit/inc/pb-widgets/widget-services.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/about/sections/welcome.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MetaBox\\Support\\Arr' not found in wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/helpers/array.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Media_Field' not found in wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/fields/file-upload.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/templatesnext-toolkit/inc/widgets/widget-advertgrid.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/about/sections/support.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_File_Field' not found in wp-content/plugins/templatesnext-toolkit/inc/meta-box/inc/fields/media.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt is a good inspiration

templatesnext-toolkit/tx-toolkit.php 85% from 13 tests

The principal PHP file in "TemplatesNext ToolKit" v. 3.2.9 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("templatesnext-toolkit.php" instead of "tx-toolkit.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin29,767 lines of code in 348 files:
LanguageFilesBlank linesComment linesLines of code
PHP1613,2395,35312,700
CSS551,3282799,227
JavaScript1221,5128517,388
Sass76694427
XML10015
JSON1005
SVG1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.58
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes120
▷ Abstract classes65.00%
▷ Concrete classes11495.00%
▷ Final classes00.00%
Methods663
▷ Static methods32148.42%
▷ Public methods57286.27%
▷ Protected methods558.30%
▷ Private methods365.43%
Functions162
▷ Named functions15696.30%
▷ Anonymous functions63.70%
Constants13
▷ Global constants1076.92%
▷ Class constants323.08%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
31 PNG files occupy 0.45MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/meta-box/img/jqueryui/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
css/images/loading_background.png0.13KB0.15KB0.00%
screenshot-1.png219.74KB218.11KB▼ 0.74%
css/images/vig-32.png64.44KB31.31KB▼ 51.42%
css/images/vig-24.png54.71KB26.73KB▼ 51.14%