78% dynamic-mailto

Code Review | Mailto Templates

WordPress plugin Mailto Templates scored 78% from 54 tests.

About plugin

  • Plugin page: dynamic-mailto
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.5
  • WordPress version: 5.8.1
  • First release: Jan 30, 2021
  • Latest release: Jan 31, 2021
  • Number of updates: 7
  • Update frequency: every 11.3 days
  • Top authors: jmurrell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 187 total downloads

Benchmarks

Plugin footprint 82% 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: ▲0.74MB] [CPU: ▲839.01ms] 50% from 4 tests

An overview of server-side resources used by Mailto Templates
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,121.64ms on /wp-admin/admin.php?page=dyn-mailto-documentation)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 839.01ms on /wp-admin/admin.php?page=dyn-mailto-documentation)
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.73976.04 ▲954.40
Dashboard /wp-admin3.85 ▲0.791,060.10 ▲1,022.90
Posts /wp-admin/edit.php3.90 ▲0.791,062.83 ▲1,032.84
Add New Post /wp-admin/post-new.php6.15 ▲0.711,059.32 ▲400.81
Media Library /wp-admin/upload.php3.73 ▲0.73999.85 ▲977.94
Documentation /wp-admin/admin.php?page=dyn-mailto-documentation3.701,121.64

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 513 new files
Database: no new tables, 1 new option
New WordPress options
widget_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Mailto Templates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.56 ▼0.075.47 ▲0.4674.68 ▼1.36
Dashboard /wp-admin2,930 ▲346.12 ▼0.02113.28 ▼19.03169.00 ▼6.15
Posts /wp-admin/edit.php2,743 ▲33.23 ▲0.0162.24 ▼3.45134.91 ▼6.10
Add New Post /wp-admin/post-new.php3,800 ▲5917.97 ▼0.51446.67 ▲5.19156.26 ▼10.35
Media Library /wp-admin/upload.php1,752 ▼05.47 ▼0.07141.49 ▼0.64169.85 ▼15.29
Documentation /wp-admin/admin.php?page=dyn-mailto-documentation1,2502.3753.86115.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 224× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/dynamic-mailto/vendor/twig/twig/src/Extension/OptimizerExtension.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Discovery\\ClassDiscovery' not found in wp-content/plugins/dynamic-mailto/vendor/php-http/discovery/src/StreamFactoryDiscovery.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\TestExpression' not found in wp-content/plugins/dynamic-mailto/vendor/twig/twig/src/Node/Expression/Test/NullTest.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/dynamic-mailto/vendor/php-http/message/src/Authentication/Chain.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/dynamic-mailto/vendor/twig/twig/src/TokenParser/ImportTokenParser.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' not found in wp-content/plugins/dynamic-mailto/vendor/symfony/options-resolver/Exception/UndefinedOptionsException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/dynamic-mailto/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/dynamic-mailto/vendor/twig/twig/src/Node/SetNode.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\odeVisitor\odeVisitorInterface' not found in wp-content/plugins/dynamic-mailto/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\TestExpression' not found in wp-content/plugins/dynamic-mailto/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=dyn-mailto-documentation
    • > Network (severe)
    wp-content/plugins/dyn-mailto/css/docs.css?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: template, email, link, dynamic, contact...

dynamic-mailto/dyn-mailto.php 92% from 13 tests

The main file in "Mailto Templates" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dynamic-mailto.php" instead of "dyn-mailto.php")

Code Analysis Passed 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 plugin24,997 lines of code in 487 files:
LanguageFilesBlank linesComment linesLines of code
PHP3304,0218,73318,985
reStructuredText1122,3762,3032,872
JSON5001,563
Markdown2878301,176
JavaScript33651191
HTML315086
YAML37448
Bourne Shell16143
CSS24033

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity6.82
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces54
Interfaces46
Traits5
Classes260
▷ Abstract classes135.00%
▷ Concrete classes24795.00%
▷ Final classes10341.70%
Methods1,306
▷ Static methods1148.73%
▷ Public methods1,13586.91%
▷ Protected methods725.51%
▷ Private methods997.58%
Functions149
▷ Named functions11677.85%
▷ Anonymous functions3322.15%
Constants69
▷ Global constants811.59%
▷ Class constants6188.41%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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