58% well-handled

Code Review | Well-Handled Email Templates

WordPress plugin Well-Handled Email Templates scored58%from 54 tests.

About plugin

  • Plugin page: well-handled
  • Plugin version: 2.4.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Nov 8, 2023
  • Number of updates: 86
  • Update frequency: every 32.2 days
  • Top authors: blobfolio (89.53%)wellhandled (11.63%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /5,708 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.39MB] [CPU: ▲8.62ms] Passed 4 tests

A check of server-side resources used by Well-Handled Email Templates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.86 ▲1.4053.31 ▲12.65
Dashboard /wp-admin4.70 ▲1.3956.94 ▲12.00
Posts /wp-admin/edit.php4.75 ▲1.3957.42 ▼0.39
Add New Post /wp-admin/post-new.php7.29 ▲1.40104.73 ▲12.47
Media Library /wp-admin/upload.php4.62 ▲1.3846.71 ▲10.40
Settings /wp-admin/edit-tags.php?taxonomy=wp_template_tag&post_type=wh-template&page=wh-settings4.5633.34
Tags /wp-admin/edit-tags.php?taxonomy=wp_template_tag&post_type=wh-template4.6142.13

Server storage [IO: ▲2.46MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 435 new files
Database: 4 new tables, 8 new options
New tables
wp_wh_message_errors
wp_wh_messages
wp_wh_message_queue
wp_wh_message_links
New WordPress options
wh_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
wh_db_version
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Well-Handled Email Templates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6414.21 ▼0.141.66 ▲0.1045.66 ▲6.59
Dashboard /wp-admin2,231 ▲545.60 ▼0.0596.57 ▼2.6839.19 ▼5.49
Posts /wp-admin/edit.php2,136 ▲361.95 ▲0.0140.10 ▼0.2435.83 ▼3.69
Add New Post /wp-admin/post-new.php1,555 ▲2023.33 ▼1.82657.66 ▲37.4952.57 ▼17.83
Media Library /wp-admin/upload.php1,436 ▲364.27 ▼0.0697.64 ▼8.2344.43 ▲0.36
Settings /wp-admin/edit-tags.php?taxonomy=wp_template_tag&post_type=wh-template&page=wh-settings280.410.083.62
Tags /wp-admin/edit-tags.php?taxonomy=wp_template_tag&post_type=wh-template1,2792.1227.7829.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/well-handled/lib/blobfolio/wp/wh/cron.php+149
    Undefined variable: hit
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_wh_message_errors
    • wp_wh_messages
    • wp_wh_message_links
    • wp_wh_message_queue
  • This plugin does not fully uninstall, leaving 8 options in the database
    • wh_db_version
    • theysaidso_admin_options
    • widget_recent-posts
    • wh_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 49× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\wh\\vendor\\Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/well-handled/lib/vendor/symfony/css-selector/Node/HashNode.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'blobfolio\\wp\\wh\\vendor\\Handlebars\\Cache' not found in wp-content/plugins/well-handled/lib/vendor/xamin/handlebars.php/src/Handlebars/Cache/Disk.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\wh\\vendor\\Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/well-handled/lib/vendor/symfony/css-selector/Node/SelectorNode.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\wh\\vendor\\Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/well-handled/lib/vendor/symfony/css-selector/XPath/Extension/FunctionExtension.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'blobfolio\\wp\\wh\\vendor\\Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/well-handled/lib/vendor/symfony/css-selector/Parser/Handler/StringHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\wh\\vendor\\Symfony\\Component\\CssSelector\\Exception\\ParseException' not found in wp-content/plugins/well-handled/lib/vendor/symfony/css-selector/Exception/ExpressionErrorException.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'blobfolio\\wp\\wh\\vendor\\Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/well-handled/lib/vendor/symfony/css-selector/Parser/Handler/CommentHandler.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\wh\\vendor\\Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/well-handled/lib/vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'blobfolio\\wp\\wh\\vendor\\Handlebars\\Context' not found in wp-content/plugins/well-handled/lib/vendor/xamin/handlebars.php/src/Handlebars/ChildContext.php:41
    • > PHP Fatal error
      Uncaught Error: Interface 'blobfolio\\wp\\wh\\vendor\\Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/well-handled/lib/vendor/symfony/css-selector/Parser/Shortcut/ElementParser.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/edit-tags.php?taxonomy=wp_template_tag&post_type=wh-template&page=wh-settings
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=wp_template_tag&post_type=wh-template&page=wh-settings - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% 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:
  • Plugin Name: You should set the name of your plugin on the first line ( === well-handled === )
Please take inspiration from this readme.txt

well-handled/index.php 92% from 13 tests

The main PHP file in "Well-Handled Email Templates" ver. 2.4.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("well-handled.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin14,557 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
PHP1322,8986,79813,835
Markdown32490535
HTML3165158
JavaScript90622
CSS5005
SVG2002

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 139)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity26.36
▷ Minimum class complexity1.00
▷ Maximum class complexity445.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity139.00
Code structure
Namespaces28
Interfaces9
Traits0
Classes110
▷ Abstract classes32.73%
▷ Concrete classes10797.27%
▷ Final classes32.80%
Methods985
▷ Static methods39540.10%
▷ Public methods86387.61%
▷ Protected methods888.93%
▷ Private methods343.45%
Functions32
▷ Named functions1031.25%
▷ Anonymous functions2268.75%
Constants137
▷ Global constants75.11%
▷ Class constants13094.89%
▷ Public constants130100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin