84% translate-emails-woocommerce

Code Review | ShopMagic Multilingual Support

WordPress plugin ShopMagic Multilingual Support scored 84% from 54 tests.

About plugin

  • Plugin page: translate-emails-...
  • Plugin version: 1.0.10
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0
  • WordPress version: 6.3.1
  • First release: Oct 20, 2021
  • Latest release: Dec 6, 2022
  • Number of updates: 23
  • Update frequency: every 18.0 days
  • Top authors: wpdesk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,333 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼5.28ms] Passed 4 tests

An overview of server-side resources used by ShopMagic Multilingual Support
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3342.30 ▲4.58
Dashboard /wp-admin3.62 ▲0.3148.94 ▼4.62
Posts /wp-admin/edit.php3.67 ▲0.3151.27 ▼2.19
Add New Post /wp-admin/post-new.php6.13 ▲0.2587.30 ▼18.87
Media Library /wp-admin/upload.php3.52 ▲0.3038.29 ▲5.46

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 94 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for ShopMagic Multilingual Support
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.56 ▼0.832.12 ▲0.3142.15 ▼0.31
Dashboard /wp-admin2,210 ▲194.88 ▼1.02108.22 ▲8.9239.88 ▼9.46
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0240.04 ▼2.2435.40 ▼0.92
Add New Post /wp-admin/post-new.php1,546 ▲218.60 ▲0.32636.53 ▲50.2953.14 ▼9.67
Media Library /wp-admin/upload.php1,389 ▲74.22 ▲0.01100.98 ▲1.9540.96 ▼2.34

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicMultilingualVendor\\WPDesk_Translatable' not found in wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/wpdesk/wp-builder/src/Plugin/SlimPlugin.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicMultilingualVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/wpdesk/wp-builder/src/Plugin/HookableCollection.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'WPDesk\\ShopMagic\\Exception\\ShopMagicException' not found in wp-content/plugins/translate-emails-woocommerce/src/Exceptions/MultilingualSupportException.php:10
    • > PHP Warning
      require_once(wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/wpdesk/wp-notice/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/wpdesk/wp-notice/init.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicMultilingualVendor\\WPDesk\\PluginBuilder\\Builder\\AbstractBuilder' not found in wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/wpdesk/wp-builder/src/Builder/InfoActivationBuilder.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/translate-emails-woocommerce/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicMultilingualVendor\\WPDesk\\PluginBuilder\\Storage\\PluginStorage' not found in wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/wpdesk/wp-builder/src/Storage/WordpressFilterStorage.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicMultilingualVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/wpdesk/wp-builder/src/Plugin/HookablePluginDependant.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicMultilingualVendor\\WPDesk\\PluginBuilder\\Plugin\\SlimPlugin' not found in wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/wpdesk/wp-builder/src/Plugin/AbstractPlugin.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/translate-emails-woocommerce/vendor_prefixed/psr/container/src/NotFoundExceptionInterface.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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: email translation, multilingual, multilanguage, translate, wpml

translate-emails-woocommerce/translate-emails-woocommerce.php Passed 13 tests

The entry point to "ShopMagic Multilingual Support" version 1.0.10 is a PHP file that has certain tags in its header comment area
86 characters long description:
Allows creating automations with follow-up and custom emails in two or more languages.

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
Success! There were no dangerous files found in this plugin4,426 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP783652,0724,037
JSON700302
JavaScript31051
Markdown25025
XML10011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces18
Interfaces23
Traits5
Classes39
▷ Abstract classes512.82%
▷ Concrete classes3487.18%
▷ Final classes617.65%
Methods285
▷ Static methods2910.18%
▷ Public methods25890.53%
▷ Protected methods82.81%
▷ Private methods196.67%
Functions25
▷ Named functions1560.00%
▷ Anonymous functions1040.00%
Constants38
▷ Global constants00.00%
▷ Class constants38100.00%
▷ Public constants38100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin