78% tgen-template-generator-for-tnew

Code Review | TGEN Template Generator for TNEW

WordPress plugin TGEN Template Generator for TNEW scored78%from 54 tests.

About plugin

  • Plugin page: tgen-template-gen...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2022
  • Latest release: Nov 29, 2022
  • Number of updates: 3
  • Update frequency: every 11.0 days
  • Top authors: lehelm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /487 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.41MB] [CPU: ▼1.36ms] Passed 4 tests

A check of server-side resources used by TGEN Template Generator for TNEW
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4139.23 ▲2.41
Dashboard /wp-admin3.72 ▲0.4246.29 ▼0.32
Posts /wp-admin/edit.php3.77 ▲0.4250.20 ▲4.79
Add New Post /wp-admin/post-new.php6.26 ▲0.3886.84 ▼10.03
Media Library /wp-admin/upload.php3.65 ▲0.4237.14 ▲2.50
TGEN - Template Generator for TNEW /wp-admin/options-general.php?page=tgentg_options3.5533.17

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

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

Browser metrics Passed 4 tests

A check of browser resources used by TGEN Template Generator for TNEW
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.62 ▼0.524.85 ▲3.2139.12 ▼3.31
Dashboard /wp-admin2,211 ▲255.84 ▼0.09106.70 ▼4.1240.69 ▲0.27
Posts /wp-admin/edit.php2,097 ▲82.02 ▲0.0240.06 ▼1.3435.07 ▲1.44
Add New Post /wp-admin/post-new.php1,532 ▼1018.22 ▼0.16609.48 ▼9.4150.91 ▼2.98
Media Library /wp-admin/upload.php1,396 ▲84.14 ▼0.0897.21 ▼3.9141.41 ▼4.64
TGEN - Template Generator for TNEW /wp-admin/options-general.php?page=tgentg_options8812.0623.3233.96

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
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_recent-posts
    • tgentg_main_options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • tgentg_generator_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/tgen-template-generator-for-tnew/public/partials/tgen-template-generator-public-display.php
    • > /wp-content/plugins/tgen-template-generator-for-tnew/admin/partials/tgen-template-generator-admin-display.php
  • 56× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractSimpleHtmlDomNode' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/voku/simple_html_dom/src/voku/helper/SimpleHtmlDomNodeBlank.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/symfony/css-selector/Parser/Shortcut/HashParser.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractSimpleXmlDom' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/voku/simple_html_dom/src/voku/helper/SimpleXmlDomBlank.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/symfony/css-selector/XPath/Extension/CombinationExtension.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/symfony/css-selector/Parser/Handler/HashHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/symfony/css-selector/Node/AttributeNode.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/tgen-template-generator-for-tnew/vendor/symfony/css-selector/Parser/Handler/NumberHandler.php:29
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/tgen-template-generator-for-tnew/vendor/pear/net_url2/tests/AllTests.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: arts, museum, template, fundraising, ticketing...

tgen-template-generator-for-tnew/tgen-template-generator.php 85% from 13 tests

The primary PHP file in "TGEN Template Generator for TNEW" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tgen-template-generator-for-tnew.php" instead of "tgen-template-generator.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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
There were no executable files found in this plugin10,927 lines of code in 147 files:
LanguageFilesBlank linesComment linesLines of code
PHP1142,4477,0248,714
Markdown103591784
JSON800576
XML4192574
YAML6250178
JavaScript2175947
CSS2151546
Cucumber1108

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.32
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces15
Interfaces13
Traits0
Classes84
▷ Abstract classes78.33%
▷ Concrete classes7791.67%
▷ Final classes22.60%
Methods930
▷ Static methods545.81%
▷ Public methods85692.04%
▷ Protected methods313.33%
▷ Private methods434.62%
Functions26
▷ Named functions1246.15%
▷ Anonymous functions1453.85%
Constants29
▷ Global constants26.90%
▷ Class constants2793.10%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin