10% triangle-email-template

Code Review | Triangle - Email Template Builder

WordPress plugin Triangle - Email Template Builder scored10%from 54 tests.

About plugin

  • Plugin page: triangle-email-te...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 30, 2020
  • Latest release: Jun 13, 2020
  • Number of updates: 13
  • Update frequency: every 3.5 days
  • Top authors: agung2001 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /614 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/triangle-email-template/src/Plugin/Helper/Directory.php+69
    mkdir(): File exists

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.31ms] Passed 4 tests

A check of server-side resources used by Triangle - Email Template Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.54 ▼1.50
Dashboard /wp-admin3.48 ▲0.1748.62 ▲0.58
Posts /wp-admin/edit.php3.53 ▲0.1849.61 ▲0.24
Add New Post /wp-admin/post-new.php6.02 ▲0.1394.23 ▼12.56
Media Library /wp-admin/upload.php3.34 ▲0.1140.48 ▲8.57
Contact /wp-admin/admin.php?page=triangle3.3853.01
Template /wp-admin/edit.php?post_type=emailtemplate3.5140.38
Setting /wp-admin/admin.php?page=triangle-setting3.4234.90

Server storage [IO: ▲6.35MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 174 new files
Database: no new tables, 10 new options
New WordPress options
triangle_animation_content
widget_recent-comments
db_upgraded
triangle_animation
widget_recent-posts
theysaidso_admin_options
triangle_animation_tab
triangle_builder_inliner
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Triangle - Email Template Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.80 ▲0.061.65 ▼0.2539.78 ▲0.14
Dashboard /wp-admin2,236 ▲514.88 ▲0.03101.02 ▼2.2238.53 ▼2.85
Posts /wp-admin/edit.php2,119 ▲272.01 ▼0.0538.99 ▼2.4135.64 ▼2.67
Add New Post /wp-admin/post-new.php1,552 ▲1018.21 ▲0.05670.79 ▲65.2052.90 ▼8.68
Media Library /wp-admin/upload.php1,412 ▲274.17 ▼0.01107.20 ▲7.3446.42 ▲3.31
Contact /wp-admin/admin.php?page=triangle1,1703.6987.6734.24
Template /wp-admin/edit.php?post_type=emailtemplate1,7182.3331.8026.58
Setting /wp-admin/admin.php?page=triangle-setting2,3882.5640.9336.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • triangle_builder_inliner
    • db_upgraded
    • widget_theysaidso_widget
    • triangle_animation_tab
    • theysaidso_admin_options
    • widget_recent-comments
    • triangle_animation
    • triangle_animation_content
    • can_compress_scripts
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 11× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/triangle-email-template/src/View/Element/redirect.php
    • > /wp-content/plugins/triangle-email-template/src/View/EmailTemplate/element/row-setting.php
    • > /wp-content/plugins/triangle-email-template/src/View/EmailTemplate/email-content.php
    • > /wp-content/plugins/triangle-email-template/src/View/EmailTemplate/backend/customizer.php
    • > /wp-content/plugins/triangle-email-template/src/View/Backend/script.php
    • > /wp-content/plugins/triangle-email-template/src/View/EmailTemplate/edit-builder.php
    • > /wp-content/plugins/triangle-email-template/src/View/Element/loading-field.php
    • > /wp-content/plugins/triangle-email-template/src/View/EmailTemplate/backend/customizer-script.php
    • > /wp-content/plugins/triangle-email-template/src/View/Element/loading.php
    • > /wp-content/plugins/triangle-email-template/src/View/Element/option_animations.php
  • 236× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/triangle-email-template/src/View/Element/option_animations.php on line 70
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/triangle-email-template/src/View/Element/option_animations.php on line 40
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/triangle-email-template/src/View/Element/option_animations.php on line 22
    • > PHP Notice
      Trying to get property 'css' of non-object in wp-content/plugins/triangle-email-template/src/View/EmailTemplate/email-content.php on line 21
    • > PHP Notice
      unserialize(): Error at offset 0 of 13 bytes in wp-content/plugins/triangle-email-template/src/View/Element/loading.php on line 5
    • > PHP Notice
      Trying to get property 'width' of non-object in wp-content/plugins/triangle-email-template/src/View/EmailTemplate/backend/customizer.php on line 20
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/triangle-email-template/src/View/Element/option_animations.php on line 28
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/triangle-email-template/src/View/Element/option_animations.php on line 46
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/triangle-email-template/src/View/Element/option_animations.php on line 70
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/triangle-email-template/src/View/Element/option_animations.php on line 82

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: The official readme.txt might help

triangle-email-template/triangle-email-template.php Passed 13 tests

"Triangle - Email Template Builder" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
Drag and drop email template editor for wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected31,342 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript183,3119,47115,769
SVG30129,299
PHP797911,9343,527
CSS15481561,493
Sass12235361,093
HTML270126
JSON40035

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.60
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes50
▷ Abstract classes48.00%
▷ Concrete classes4692.00%
▷ Final classes00.00%
Methods291
▷ Static methods31.03%
▷ Public methods28497.59%
▷ Protected methods10.34%
▷ Private methods62.06%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/demo/fashion/images/006-instagram-logo.png7.29KB5.00KB▼ 31.43%
assets/demo/fashion/images/004-twitter-logo.png7.34KB3.82KB▼ 48.00%
assets/demo/fashion/images/005-facebook.png2.27KB1.08KB▼ 52.43%
assets/demo/e-verify/images/email.png9.91KB10.93KB0.00%