62% acymailing

Code Review | Newsletter for WordPress - AcyMailing Newsletter

WordPress plugin Newsletter for WordPress - AcyMailing Newsletter scored 62% from 54 tests.

About plugin

  • Plugin page: acymailing
  • Plugin version: 7.6.2
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.8.1
  • First release: Nov 23, 2018
  • Latest release: Nov 15, 2021
  • Number of updates: 483
  • Update frequency: every 2.3 days
  • Top authors: acyba (100%)

Code review

54 tests

User reviews

131 reviews

Install metrics

6,000+ active / 46,078 total downloads

Benchmarks

Plugin footprint 64% 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: ▲5.35MB] [CPU: ▲235.16ms] 50% from 4 tests

An overview of server-side resources used by Newsletter for WordPress - AcyMailing Newsletter
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.35MB on /wp-admin/admin.php?page=acymailing_fields)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 235.16ms on /wp-admin/admin.php?page=acymailing_fields)
PageMemory (MB)CPU Time (ms)
Home /8.31 ▲5.48444.04 ▲404.58
Dashboard /wp-admin8.41 ▲5.36430.79 ▲381.78
Posts /wp-admin/edit.php8.47 ▲5.36416.41 ▲375.64
Add New Post /wp-admin/post-new.php10.77 ▲5.34462.97 ▼189.79
Media Library /wp-admin/upload.php8.36 ▲5.36407.37 ▲372.99
Dashboard /wp-admin/admin.php?page=acymailing_dashboard8.65422.18
front /wp-admin/admin.php?page=acymailing_front8.49399.83
Lists /wp-admin/admin.php?page=acymailing_lists8.70441.18
file /wp-admin/admin.php?page=acymailing_file8.64429.84
dynamics /wp-admin/admin.php?page=acymailing_dynamics8.64398.06
Go Pro /wp-admin/admin.php?page=acymailing_gopro8.64421.88
Emails /wp-admin/admin.php?page=acymailing_campaigns8.70411.60
Configuration /wp-admin/admin.php?page=acymailing_configuration8.70456.09
Add-ons /wp-admin/admin.php?page=acymailing_plugins8.67404.72
Custom fields /wp-admin/admin.php?page=acymailing_fields8.70416.07

Server storage [IO: ▲11.34MB] [DB: ▲0.48MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 1,057 new files
Database: 27 new tables, 3 new options
New tables
wp_acym_campaign
wp_acym_mail_has_list
wp_acym_url
wp_acym_automation
wp_acym_tag
wp_acym_form
wp_acym_user_has_list
wp_acym_condition
wp_acym_rule
wp_acym_action
...
New WordPress options
widget_acym_archive_widget
widget_acym_profile_widget
widget_acym_subscriptionform_widget

Browser metrics Passed 4 tests

Newsletter for WordPress - AcyMailing Newsletter: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲23315.88 ▲0.059.56 ▲1.7749.01 ▲1.00
Dashboard /wp-admin3,094 ▲1635.95 ▼0.01154.12 ▲4.36116.04 ▼2.71
Posts /wp-admin/edit.php2,845 ▲1062.69 ▲0.0068.67 ▼1.0997.90 ▲4.35
Add New Post /wp-admin/post-new.php1,740 ▲5717.26 ▼1.59392.39 ▲2.61115.74 ▲1.17
Media Library /wp-admin/upload.php1,913 ▲1035.00 ▼0.00161.05 ▼4.17129.96 ▲6.03
Dashboard /wp-admin/admin.php?page=acymailing_dashboard1,3676.3895.50130.91
front /wp-admin/admin.php?page=acymailing_front1,1212.0560.5664.98
Lists /wp-admin/admin.php?page=acymailing_lists1,3686.5299.18111.73
file /wp-admin/admin.php?page=acymailing_file1,7245.85109.0885.86
dynamics /wp-admin/admin.php?page=acymailing_dynamics1,7086.03113.4366.72
Go Pro /wp-admin/admin.php?page=acymailing_gopro1,7265.89108.62109.95
Emails /wp-admin/admin.php?page=acymailing_campaigns1,4285.7982.34113.76
Configuration /wp-admin/admin.php?page=acymailing_configuration1,3685.8279.88111.89
Add-ons /wp-admin/admin.php?page=acymailing_plugins1,7275.92105.5396.25
Custom fields /wp-admin/admin.php?page=acymailing_fields1,4285.7791.19110.83

Uninstaller [IO: ▲2.48MB] [DB: ▲0.48MB] 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 27 tables in the database
    • wp_acym_segment
    • wp_acym_user
    • wp_acym_field
    • wp_acym_followup_has_mail
    • wp_acym_user_has_list
    • wp_acym_mail_override
    • wp_acym_plugin
    • wp_acym_mail_stat
    • wp_acym_configuration
    • wp_acym_mail
    • ...
  • The uninstall procedure has failed, leaving 3 options in the database
    • widget_acym_archive_widget
    • widget_acym_subscriptionform_widget
    • widget_acym_profile_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_plugins
    • > Warning in wp-content/plugins/acymailing/back/helpers/global/global.php+109
    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
  • 11× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/acymailing/index.php
    • > /wp-content/plugins/acymailing/back/views/forms/tmpl/edit_menu.php
    • > /wp-content/plugins/acymailing/back/partial/forms/button.php
    • > /wp-content/plugins/acymailing/back/views/campaigns/tmpl/summary_languages.php
    • > /wp-content/plugins/acymailing/back/partial/configuration/sending_methods.php
    • > /wp-content/plugins/acymailing/back/partial/editor/default_template.php
    • > /wp-content/plugins/acymailing/back/partial/toolbar/button_main.php
    • > /wp-content/plugins/acymailing/back/partial/forms/lists.php
    • > /wp-content/plugins/acymailing/back/views/users/tmpl/edit_subscription_subscribed.php
    • > /wp-content/plugins/acymailing/back/partial/forms/cookie.php
  • 612× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymClass' not found in wp-content/plugins/acymailing/back/classes/history.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acym_translation() in wp-content/plugins/acymailing/back/views/fields/tmpl/edit_values.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/acymailing/back/partial/forms/popup.php on line 11
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/acymailing/back/partial/forms/button.php on line 7
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/acymailing/back/partial/forms/lists.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'SendinblueClass' not found in wp-content/plugins/acymailing/back/dynamics/sendinblue/integration.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymView' not found in wp-content/plugins/acymailing/front/views/frontfile/view.html.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymObject' not found in wp-content/plugins/acymailing/back/helpers/splashscreen.php:7
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/acymailing/back/partial/forms/shortcode.php on line 1
    • > PHP Notice
      Undefined variable: edition in wp-content/plugins/acymailing/back/partial/forms/header.php on line 3

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 96% 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: mailgun, smtp newsletter, marketing newsletter, newsletter, sendinblue

acymailing/index.php 92% from 13 tests

Analyzing the main PHP file in "Newsletter for WordPress - AcyMailing Newsletter" version 7.6.2
The following require your attention:
  • 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 plugin74,880 lines of code in 648 files:
LanguageFilesBlank linesComment linesLines of code
PHP44311,3634,81169,426
INI1202,384
JavaScript1403807311,834
SQL145126502
SVG9211391
CSS49408291
XML40050
Markdown1102

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 133)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity43.23
▷ Minimum class complexity1.00
▷ Maximum class complexity504.00
Average method complexity5.11
▷ Minimum method complexity1.00
▷ Maximum method complexity133.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes196
▷ Abstract classes00.00%
▷ Concrete classes196100.00%
▷ Final classes00.00%
Methods2,016
▷ Static methods361.79%
▷ Public methods1,50474.60%
▷ Protected methods21610.71%
▷ Private methods29614.68%
Functions249
▷ Named functions23694.78%
▷ Anonymous functions135.22%
Constants304
▷ Global constants9129.93%
▷ Class constants21370.07%
▷ Public constants213100.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
338 compressed PNG files occupy 1.72MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/images/flags/pe.png0.14KB0.12KB▼ 14.39%
media/images/flags/bn.png1.81KB1.46KB▼ 19.34%
media/images/flags/aq.png0.93KB0.88KB▼ 5.97%
media/images/flags/af.png0.88KB0.90KB0.00%
media/images/flags/zw.png1.04KB1.16KB0.00%