60% acymailing

Code Review | AcyMailing - Newsletter & mailing automation for WordPress

WordPress plugin AcyMailing - Newsletter & mailing automation for WordPress scored60%from 54 tests.

About plugin

  • Plugin page: acymailing
  • Plugin version: 9.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2018
  • Latest release: Nov 9, 2023
  • Number of updates: 555
  • Update frequency: every 3.3 days
  • Top authors: acyba (100%)

Code review

54 tests

User reviews

150 reviews

Install metrics

7,000+ active /88,007 total downloads

Benchmarks

Plugin footprint 63% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲6.43MB] [CPU: ▲352.01ms] 0% from 4 tests

An overview of server-side resources used by AcyMailing - Newsletter & mailing automation for WordPress
Please take the time to fix the following items
  • RAM: Total memory usage must be kept under 10MB (currently 10.04MB on /wp-admin/admin.php?page=acymailing_lists)
  • CPU: The total CPU usage must kept under 500.00ms (currently 689.20ms on /wp-admin/admin.php?page=acymailing_dynamics)
  • Extra RAM: The extra memory usage must be under 5MB (currently 6.43MB on /wp-admin/admin.php?page=acymailing_lists)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 352.01ms on /wp-admin/admin.php?page=acymailing_lists)
PageMemory (MB)CPU Time (ms)
Home /9.98 ▲6.51401.99 ▲362.58
Dashboard /wp-admin9.74 ▲6.43402.46 ▲356.09
Posts /wp-admin/edit.php9.79 ▲6.43427.38 ▲377.32
Add New Post /wp-admin/post-new.php12.34 ▲6.44443.62 ▲345.59
Media Library /wp-admin/upload.php9.66 ▲6.43375.69 ▲343.78
dynamics /wp-admin/admin.php?page=acymailing_dynamics10.00689.20
Templates /wp-admin/admin.php?page=acymailing_mails10.04401.33
Subscription forms /wp-admin/admin.php?page=acymailing_forms10.04413.81
Queue /wp-admin/admin.php?page=acymailing_queue10.04388.16
Go Pro /wp-admin/admin.php?page=acymailing_gopro10.01399.32
Dashboard /wp-admin/admin.php?page=acymailing_dashboard10.01389.94
Configuration /wp-admin/admin.php?page=acymailing_configuration10.04388.23
file /wp-admin/admin.php?page=acymailing_file10.01407.79
Subscribers /wp-admin/admin.php?page=acymailing_users10.04375.92
Lists /wp-admin/admin.php?page=acymailing_lists10.04403.88

Server storage [IO: ▲11.90MB] [DB: ▲0.13MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 1,294 new files
Database: 30 new tables, 9 new options
New tables
wp_acym_mail_has_list
wp_acym_followup
wp_acym_plugin
wp_acym_step
wp_acym_user
wp_acym_field
wp_acym_queue
wp_acym_user_stat
wp_acym_url_click
wp_acym_rule
...
New WordPress options
widget_acym_subscriptionform_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_acym_profile_widget
widget_recent-posts
widget_acym_archive_widget
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

AcyMailing - Newsletter & mailing automation for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14214.40 ▲0.262.71 ▲1.1242.58 ▲3.19
Dashboard /wp-admin2,281 ▲1045.63 ▼0.0182.40 ▼11.6337.67 ▼7.77
Posts /wp-admin/edit.php2,185 ▲852.01 ▲0.0235.68 ▼5.4332.16 ▼5.85
Add New Post /wp-admin/post-new.php1,549 ▲1420.49 ▼4.78675.87 ▲61.1456.89 ▼15.00
Media Library /wp-admin/upload.php1,489 ▲894.21 ▲0.01108.33 ▲7.0145.42 ▲1.27
dynamics /wp-admin/admin.php?page=acymailing_dynamics1,3005.2889.04104.81
Templates /wp-admin/admin.php?page=acymailing_mails1,3025.2795.5451.97
Subscription forms /wp-admin/admin.php?page=acymailing_forms1,3065.1768.3049.66
Queue /wp-admin/admin.php?page=acymailing_queue1,3035.3465.7452.23
Go Pro /wp-admin/admin.php?page=acymailing_gopro1,3095.2466.6446.43
Dashboard /wp-admin/admin.php?page=acymailing_dashboard1,3095.2171.5048.71
Configuration /wp-admin/admin.php?page=acymailing_configuration1,3035.2065.9149.13
file /wp-admin/admin.php?page=acymailing_file1,3105.1970.8845.46
Subscribers /wp-admin/admin.php?page=acymailing_users1,3035.2267.2549.01
Lists /wp-admin/admin.php?page=acymailing_lists1,3035.2067.7848.71

Uninstaller [IO: ▲0.36MB] [DB: ▲0.13MB] 50% 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
  • The plugin did not uninstall successfully, leaving 30 tables in the database
    • wp_acym_segment
    • wp_acym_action
    • wp_acym_rule
    • wp_acym_mailbox_action
    • wp_acym_followup_has_mail
    • wp_acym_url
    • wp_acym_custom_zone
    • wp_acym_mail_has_list
    • wp_acym_user_stat
    • wp_acym_field
    • ...
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_acym_subscriptionform_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_acym_archive_widget
    • widget_recent-posts
    • widget_acym_profile_widget
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=acymailing_lists
    • > Warning in wp-content/plugins/acymailing/back/helpers/global/global.php+118
    session_start(): Cannot start session when headers already sent

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
Almost there! Just fix the following items
  • 10× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/acymailing/back/partial/toolbar/button_main.php
    • > /wp-content/plugins/acymailing/back/views/forms/tmpl/edit_menu.php
    • > /wp-content/plugins/acymailing/back/views/campaigns/tmpl/summary_languages.php
    • > /wp-content/plugins/acymailing/back/views/campaigns/tmpl/summary_abtest.php
    • > /wp-content/plugins/acymailing/back/partial/forms/cookie.php
    • > /wp-content/plugins/acymailing/back/views/users/tmpl/edit_subscription_subscribed.php
    • > /wp-content/plugins/acymailing/back/views/users/tmpl/edit_subscription_unsubscribed.php
    • > /wp-content/plugins/acymailing/back/partial/editor/default_template.php
    • > /wp-content/plugins/acymailing/index.php
    • > /wp-content/plugins/acymailing/back/partial/forms/lists.php
  • 724× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acym_completeLink() in wp-content/plugins/acymailing/back/views/dashboard/tmpl/walk_through.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acymailing/back/views/campaigns/tmpl/summary_languages.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'SendinblueClass' not found in wp-content/plugins/acymailing/back/dynamics/sendinblue/list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acym_translation() in wp-content/plugins/acymailing/front/views/archive/tmpl/view.php:4
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/acymailing/back/libraries/wordpress/defines.php on line 44
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymView' not found in wp-content/plugins/acymailing/back/views/stats/view.html.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acymailing/back/partial/forms/lists.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymView' not found in wp-content/plugins/acymailing/back/views/dashboard/view.html.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acymailing/back/views/file/tmpl/select.php on line 1
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/acymailing/back/partial/forms/header.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: newsletter, automation, email marketing, contact list, drag-and-drop

acymailing/index.php 77% from 13 tests

Analyzing the main PHP file in "AcyMailing - Newsletter & mailing automation for WordPress" version 9.0.2
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.0")
  • Requires PHP: Required version must match the one declared in readme.txt ("7.2.0" instead of "7.2")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("acymailing.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin90,791 lines of code in 877 files:
LanguageFilesBlank linesComment linesLines of code
PHP66513,9558,11586,395
INI1202,782
SQL148141549
SVG10212427
CSS49408291
JavaScript143073217
JSON20070
XML40050
Markdown26010

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 193)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity27.33
▷ Minimum class complexity1.00
▷ Maximum class complexity516.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity193.00
Code structure
Namespaces49
Interfaces13
Traits84
Classes288
▷ Abstract classes93.12%
▷ Concrete classes27996.88%
▷ Final classes00.00%
Methods2,754
▷ Static methods943.41%
▷ Public methods2,17578.98%
▷ Protected methods2258.17%
▷ Private methods35412.85%
Functions287
▷ Named functions25588.85%
▷ Anonymous functions3211.15%
Constants337
▷ Global constants8926.41%
▷ Class constants24873.59%
▷ Public constants23695.16%

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
345 compressed PNG files occupy 1.42MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/images/flags/pe.png0.11KB0.12KB0.00%
media/images/flags/tv.png0.96KB0.97KB0.00%
media/images/plugins/rss.png15.14KB3.79KB▼ 74.93%
media/images/flags/ny.png0.36KB0.36KB0.00%
media/images/flags/kz.png0.71KB0.71KB0.00%