10% acymailing

Code Review | Newsletter for WordPress - AcyMailing Newsletter

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

About plugin

  • Plugin page: acymailing
  • Plugin version: 7.7.6
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.2
  • WordPress version: 5.9.2
  • First release: Nov 23, 2018
  • Latest release: Mar 21, 2022
  • Number of updates: 500
  • Update frequency: every 2.4 days
  • Top authors: acyba (100%)

Code review

54 tests

User reviews

137 reviews

Install metrics

6,000+ active / 52,611 total downloads

Benchmarks

Plugin footprint 39% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/acymailing/back/helpers/update.php+409
    Trying to get property 'id' of non-object

Server metrics [RAM: ▲5.45MB] [CPU: ▲215.18ms] 25% 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
  • CPU: The total CPU usage must kept under 500.00ms (currently 610.34ms on /wp-admin/admin.php?page=acymailing_stats)
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.45MB on /wp-admin/admin.php?page=acymailing_dynamics)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 215.18ms on /wp-admin/admin.php?page=acymailing_dynamics)
PageMemory (MB)CPU Time (ms)
Home /9.19 ▲5.67456.11 ▲407.69
Dashboard /wp-admin8.84 ▲5.43545.89 ▲512.68
Posts /wp-admin/edit.php9.11 ▲5.471,408.79 ▲1,369.22
Add New Post /wp-admin/post-new.php12.39 ▲5.42707.83 ▼568.05
Media Library /wp-admin/upload.php8.79 ▲5.49532.80 ▲508.39
Configuration /wp-admin/admin.php?page=acymailing_configuration9.12735.87
language /wp-admin/admin.php?page=acymailing_language9.10791.30
Queue /wp-admin/admin.php?page=acymailing_queue9.10576.53
Lists /wp-admin/admin.php?page=acymailing_lists9.13657.98
Templates /wp-admin/admin.php?page=acymailing_mails9.13507.19
Subscription forms /wp-admin/admin.php?page=acymailing_forms9.13564.39
Dashboard /wp-admin/admin.php?page=acymailing_dashboard9.10557.23
Custom fields /wp-admin/admin.php?page=acymailing_fields9.13648.48
Statistics /wp-admin/admin.php?page=acymailing_stats9.13610.34
dynamics /wp-admin/admin.php?page=acymailing_dynamics9.10498.86

Server storage [IO: ▲11.33MB] [DB: ▲0.47MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 1,058 new files
Database: 27 new tables, 3 new options
New tables
wp_acym_plugin
wp_acym_user_has_field
wp_acym_step
wp_acym_field
wp_acym_url_click
wp_acym_mail_has_list
wp_acym_user
wp_acym_mail
wp_acym_followup_has_mail
wp_acym_user_stat
...
New WordPress options
widget_acym_profile_widget
widget_acym_archive_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,900 ▲17815.86 ▲0.196.35 ▲0.662.05 ▼0.21
Dashboard /wp-admin2,995 ▲1346.16 ▼0.00119.28 ▼15.27158.83 ▼3.00
Posts /wp-admin/edit.php2,795 ▲1013.38 ▲0.0265.17 ▼2.40145.18 ▼3.40
Add New Post /wp-admin/post-new.php1,719 ▼5420.67 ▼1.07400.80 ▼39.33143.78 ▼8.20
Media Library /wp-admin/upload.php1,802 ▲1045.54 ▲0.06138.57 ▼6.17195.02 ▲8.58
Configuration /wp-admin/admin.php?page=acymailing_configuration1,3687.06100.38247.72
language /wp-admin/admin.php?page=acymailing_language1,7457.46125.05165.59
Queue /wp-admin/admin.php?page=acymailing_queue1,3597.0366.75184.84
Lists /wp-admin/admin.php?page=acymailing_lists1,3377.1368.94159.95
Templates /wp-admin/admin.php?page=acymailing_mails1,3846.9868.25181.62
Subscription forms /wp-admin/admin.php?page=acymailing_forms1,3856.8968.48184.35
Dashboard /wp-admin/admin.php?page=acymailing_dashboard1,3406.9068.55163.69
Custom fields /wp-admin/admin.php?page=acymailing_fields1,3857.1168.60184.87
Statistics /wp-admin/admin.php?page=acymailing_stats1,3546.9967.88187.15
dynamics /wp-admin/admin.php?page=acymailing_dynamics1,7167.2097.69164.78

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_user_has_field
    • wp_acym_user_has_list
    • wp_acym_url_click
    • wp_acym_mail
    • wp_acym_mail_override
    • wp_acym_followup
    • wp_acym_plugin
    • wp_acym_mail_has_list
    • wp_acym_queue
    • wp_acym_history
    • ...
  • The uninstall procedure has failed, leaving 3 options in the database
    • widget_acym_subscriptionform_widget
    • widget_acym_archive_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_dynamics
    • > 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/back/views/campaigns/tmpl/summary_languages.php
    • > /wp-content/plugins/acymailing/index.php
    • > /wp-content/plugins/acymailing/back/partial/toolbar/button_main.php
    • > /wp-content/plugins/acymailing/back/views/users/tmpl/edit_subscription_subscribed.php
    • > /wp-content/plugins/acymailing/back/partial/configuration/sending_methods.php
    • > /wp-content/plugins/acymailing/front/views/archive/tmpl/view.php
    • > /wp-content/plugins/acymailing/back/partial/forms/lists.php
    • > /wp-content/plugins/acymailing/back/partial/editor/default_template.php
    • > /wp-content/plugins/acymailing/back/partial/forms/cookie.php
    • > /wp-content/plugins/acymailing/back/views/forms/tmpl/edit_menu.php
  • 591× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > 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 Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/acymailing/back/libraries/wordpress/defines.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acym_completeLink() in wp-content/plugins/acymailing/back/views/fields/tmpl/edit.php:7
    • > PHP Warning
      Use of undefined constant ACYM_INC - assumed 'ACYM_INC' (this will throw an Error in a future version of PHP) in wp-content/plugins/acymailing/back/helpers/mailer.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymView' not found in wp-content/plugins/acymailing/back/views/stats/view.html.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acym_translationSprintf() in wp-content/plugins/acymailing/back/views/mails/tmpl/listing_import.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acym_getVar() in wp-content/plugins/acymailing/back/views/bounces/tmpl/listing.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AcyMailing\\Init\\add_filter() in wp-content/plugins/acymailing/wpinit/wprocket.php:9
    • > 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: Call to undefined function acym_escape() in wp-content/plugins/acymailing/front/views/frontmails/tmpl/edit.php: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, sendinblue, marketing newsletter, newsletter

acymailing/index.php 92% from 13 tests

Analyzing the main PHP file in "Newsletter for WordPress - AcyMailing Newsletter" version 7.7.6
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,229 lines of code in 647 files:
LanguageFilesBlank linesComment linesLines of code
PHP44611,4784,80970,358
INI1202,425
SQL145126503
SVG9211391
CSS49408291
JavaScript136073210
XML40049
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 134)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity43.58
▷ Minimum class complexity1.00
▷ Maximum class complexity504.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity134.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes198
▷ Abstract classes00.00%
▷ Concrete classes198100.00%
▷ Final classes00.00%
Methods2,047
▷ Static methods361.76%
▷ Public methods1,53174.79%
▷ Protected methods22010.75%
▷ Private methods29614.46%
Functions250
▷ Named functions23694.40%
▷ Anonymous functions145.60%
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
336 compressed PNG files occupy 1.70MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
media/images/flags/kr.png1.49KB1.36KB▼ 8.85%
media/images/flags/jm.png0.95KB0.86KB▼ 8.77%
media/images/flags/pn.png2.13KB1.59KB▼ 25.34%
media/images/flags/sy.png0.28KB0.23KB▼ 17.01%
media/images/flags/ch.png0.14KB0.12KB▼ 10.00%