73% advanced-emailing-for-woocommerce

Code Review | Advanced Emailing for WooCommerce

WordPress plugin Advanced Emailing for WooCommerce scored 73% from 54 tests.

About plugin

  • Plugin page: advanced-emailing...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: May 4, 2022
  • Latest release: Aug 24, 2023
  • Number of updates: 39
  • Update frequency: every 12.3 days
  • Top authors: EDGARROJAS (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 423 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.13ms] Passed 4 tests

Server-side resources used by Advanced Emailing for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.35 ▼2.23
Dashboard /wp-admin3.35 ▲0.0445.33 ▼0.81
Posts /wp-admin/edit.php3.46 ▲0.1148.20 ▼3.49
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.45 ▼9.99
Media Library /wp-admin/upload.php3.27 ▲0.0436.47 ▲3.13

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 700 new files
Database: 2 new tables, 6 new options
New tables
wp_rnadvanceemailingwc_emails
wp_rnadvanceemailingwc_emails_trigger
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Emailing for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.71 ▼0.671.92 ▲0.0439.38 ▼1.09
Dashboard /wp-admin2,206 ▲214.87 ▼1.04102.73 ▼1.0945.57 ▼0.07
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0436.79 ▼2.9034.57 ▼0.82
Add New Post /wp-admin/post-new.php1,542 ▼023.24 ▲4.96652.60 ▲17.9260.06 ▲5.34
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.01101.31 ▼1.3346.84 ▲1.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_rnadvanceemailingwc_emails
    • wp_rnadvanceemailingwc_emails_trigger
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 366× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Renderer\\Module\\ModuleInterface' not found in wp-content/plugins/advanced-emailing-for-woocommerce/vendor/bacon/bacon-qr-code/src/Renderer/Module/SquareModule.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/advanced-emailing-for-woocommerce/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'rnadvanceemailingwc\\Fields\\Core\\FieldBase' not found in wp-content/plugins/advanced-emailing-for-woocommerce/Fields/SubTotalFields/SubTotalField.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\IncludeNode' not found in wp-content/plugins/advanced-emailing-for-woocommerce/vendor/twig/twig/src/Node/EmbedNode.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/advanced-emailing-for-woocommerce/vendor/twig/twig/src/Node/ForNode.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Renderer\\Path\\OperationInterface' not found in wp-content/plugins/advanced-emailing-for-woocommerce/vendor/bacon/bacon-qr-code/src/Renderer/Path/Curve.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'rnadvanceemailingwc\\Managers\\ConditionManager\\Comparators\\Core\\ComparatorBase' not found in wp-content/plugins/advanced-emailing-for-woocommerce/Managers/ConditionManager/Comparators/StandardComparator.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/advanced-emailing-for-woocommerce/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Renderer\\Eye\\EyeInterface' not found in wp-content/plugins/advanced-emailing-for-woocommerce/vendor/bacon/bacon-qr-code/src/Renderer/Eye/ModuleEye.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'rnadvanceemailingwc\\Utilities\\TreeSeeker\\INode' not found in wp-content/plugins/advanced-emailing-for-woocommerce/TwigManager/TextRenderer/Core/TextRendererBase.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: woocommerce, emailing, woocommerce emails

advanced-emailing-for-woocommerce/rnadvancedemailingwc.php 77% from 13 tests

The main file in "Advanced Emailing for WooCommerce" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-emailing-for-woocommerce.php" instead of "rnadvancedemailingwc.php")
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin70,658 lines of code in 667 files:
LanguageFilesBlank linesComment linesLines of code
PHP5617,6298,20733,470
JavaScript387,55898929,995
CSS298881155,704
JSON17001,134
Markdown9650256
Twig105972
XML11016
reStructuredText18510
YAML1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.87
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces117
Interfaces46
Traits0
Classes501
▷ Abstract classes275.39%
▷ Concrete classes47494.61%
▷ Final classes16434.60%
Methods2,469
▷ Static methods2299.28%
▷ Public methods2,17888.21%
▷ Protected methods853.44%
▷ Private methods2068.34%
Functions208
▷ Named functions16378.37%
▷ Anonymous functions4521.63%
Constants182
▷ Global constants73.85%
▷ Class constants17596.15%
▷ Public constants9051.43%

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
8 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Templates/Locals/ContactForm/Image.png3.14KB1.71KB▼ 45.76%
Templates/Locals/Blank/Image.png6.98KB3.43KB▼ 50.84%
images/temporalImage.png15.96KB5.61KB▼ 64.86%
vendor/bacon/bacon-qr-code/test/Integration/__snapshots__/files/ImagickRenderingTest__testIssue79__1.png8.17KB4.75KB▼ 41.88%
images/fieldimages/paragraph.png0.15KB0.11KB▼ 25.49%