84% twentig

Code Review | Toolkit for Block Theme (Starter Templates, Gutenberg Blocks, Patterns, Google Fonts) – Twentig

WordPress plugin Toolkit for Block Theme (Starter Templates, Gutenberg Blocks, Patterns, Google Fonts) – Twentig scored84%from 54 tests.

About plugin

  • Plugin page: twentig
  • Plugin version: 1.7.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.4
  • WordPress version: 6.3.1
  • First release: May 29, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 186
  • Update frequency: every 8.9 days
  • Top authors: twentig (100%)

Code review

54 tests

User reviews

144 reviews

Install metrics

20,000+ active /440,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.09MB] [CPU: ▲19.77ms] Passed 4 tests

Analyzing server-side resources used by Toolkit for Block Theme (Starter Templates, Gutenberg Blocks, Patterns, Google Fonts) – Twentig
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.59 ▲2.1263.52 ▲22.10
Dashboard /wp-admin5.40 ▲2.0567.18 ▲14.49
Posts /wp-admin/edit.php5.45 ▲2.0967.08 ▲20.86
Add New Post /wp-admin/post-new.php9.42 ▲3.54124.10 ▲33.66
Media Library /wp-admin/upload.php5.32 ▲2.0956.61 ▲21.64

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 211 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Toolkit for Block Theme (Starter Templates, Gutenberg Blocks, Patterns, Google Fonts) – Twentig
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6514.38 ▲0.041.79 ▲0.0844.41 ▲0.87
Dashboard /wp-admin2,227 ▲605.60 ▼0.0183.06 ▼23.7637.61 ▼0.71
Posts /wp-admin/edit.php2,129 ▲262.03 ▲0.0540.00 ▲2.4434.94 ▲1.99
Add New Post /wp-admin/post-new.php1,814 ▲28826.41 ▲2.79619.48 ▲40.3251.10 ▼0.48
Media Library /wp-admin/upload.php1,429 ▲294.17 ▼0.0396.03 ▼3.1542.60 ▲0.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 81× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_x() in wp-content/plugins/twentig/inc/patterns/text-image.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function twentig_register_block_pattern() in wp-content/plugins/twentig/inc/classic/patterns/list.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/twentig/inc/classic/theme-tools/404.php:46
    • > PHP Warning
      Use of undefined constant TWENTIG_PATH - assumed 'TWENTIG_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/twentig/inc/dashboard/class-twentig-dashboard.php on line 41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function twentig_register_block_pattern() in wp-content/plugins/twentig/inc/classic/patterns/events.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function twentig_register_block_pattern() in wp-content/plugins/twentig/inc/classic/patterns/numbers.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function twentig_register_block_pattern() in wp-content/plugins/twentig/inc/classic/patterns/single-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_support() in wp-content/plugins/twentig/inc/classic/patterns/contact.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/twentig/inc/custom-fonts.php:324
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twentig/inc/classic/twentytwentyone/plugins.php:35

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: twenty twenty four, gutenberg, google fonts, gutenberg blocks, templates

twentig/twentig.php Passed 13 tests

"Toolkit for Block Theme (Starter Templates, Gutenberg Blocks, Patterns, Google Fonts) – Twentig" version 1.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
88 characters long description:
With its powerful tools, Twentig makes it easy to create and customize your own website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin24,648 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1043,0572,70921,099
XML23215711,636
JavaScript9213681,538
CSS68480367
SVG7007
JSON1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.24
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity5.09
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods129
▷ Static methods43.10%
▷ Public methods11891.47%
▷ Protected methods86.20%
▷ Private methods32.33%
Functions254
▷ Named functions23492.13%
▷ Anonymous functions207.87%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.07MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
dist/images/font-presets.png67.31KB72.99KB0.00%