64% aomailer

Code Review | TargetSMS.ru: СМС/Email-рассылки и уведомления

WordPress plugin TargetSMS.ru: СМС/Email-рассылки и уведомления scored 64% from 54 tests.

About plugin

  • Plugin page: aomailer
  • Plugin version: 1.0.42
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.9-6.0
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Mar 6, 2023
  • Number of updates: 42
  • Update frequency: every 32.1 days
  • Top authors: targetsms (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 2,130 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.35ms] Passed 4 tests

This is a short check of server-side resources used by TargetSMS.ru: СМС/Email-рассылки и уведомления
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.26 ▼1.30
Dashboard /wp-admin3.31 ▲0.0047.08 ▲2.06
Posts /wp-admin/edit.php3.36 ▲0.0043.05 ▼6.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.09 ▲0.43
Media Library /wp-admin/upload.php3.23 ▲0.0033.45 ▼2.17

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TargetSMS.ru: СМС/Email-рассылки и уведомления
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.28 ▼0.951.75 ▼0.2343.47 ▼3.32
Dashboard /wp-admin2,203 ▲145.83 ▲0.71109.25 ▼5.5843.52 ▲5.91
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0134.01 ▼14.7732.99 ▼4.68
Add New Post /wp-admin/post-new.php1,533 ▲1923.52 ▲5.97677.76 ▼67.3858.68 ▲1.04
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.0491.44 ▼18.8742.44 ▼2.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Error in wp-content/plugins/aomailer/includes/AomailerDB.php+781
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/aomailer/includes/AomailerDB.php:781
    Stack trace:
    #0 wp-content/plugins/aomailer/includes/AomailerDB.php(6): AomailerDB->get_custom_statuses()
    #1 wp-content/plugins/aomailer/includes/AomailerDB.php(901): AomailerDB->__construct()
    #2 wp-content/plugins/aomailer/includes/AomailerAdmin.php(505): AomailerDB::aomp()
    #3 wp-includes/class-wp-hook.php(310): AomailerAdmin::uninstall()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/includes/plugin.php(1269): do_action()
    #7 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 66 files (1.82MB) in the plugin directory
    • (new file) assets/css/style.min.css
    • (new file) assets/css/style.css
    • (new file) assets/fonts/fontawesome-webfont.svg
    • (new file) assets/fonts/FontAwesome.otf
    • (new file) assets/css/bootstrap-3.3.7.min.css
    • (new file) assets/css/bootstrap-switch-3.3.2.min.css
    • (new file) .htaccess
    • (new file) assets/css/font-awesome-4.7.0.min.css
    • (new file) assets/fonts/fontawesome-webfont.eot
    • (new file) aomailer_plugin.php
    • ...
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in wp-content/plugins/aomailer/views/sms_page/__sms_templates.php on line 358
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/aomailer/aomailer_plugin.php:84
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/aomailer/views/sms_page/__sms_events.php on line 228
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aomailer/views/email_page/__email_settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aomailer/views/sms_page/__sms_mailing.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aomailer/views/sms_page/__sms_history.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/aomailer/views/sms_page/__sms_help.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/aomailer/views/settings_page_email.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aomailer/views/sms_page/__sms_settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/aomailer/views/settings_page_sms.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: targetsms

aomailer/aomailer_plugin.php 85% from 13 tests

The main file in "TargetSMS.ru: СМС/Email-рассылки и уведомления" v. 1.0.42 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aomailer.php" instead of "aomailer_plugin.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 460 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin7,664 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP182653663,706
SVG2002,959
PO File4408412868
JavaScript6134126
CSS50335

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity82.50
▷ Minimum class complexity10.00
▷ Maximum class complexity143.00
Average method complexity6.56
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods88
▷ Static methods1415.91%
▷ Public methods7079.55%
▷ Protected methods00.00%
▷ Private methods1820.45%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ui/ui-icons_cd0a0a_256x240.png3.67KB4.17KB0.00%
assets/img/ui/ui-icons_454545_256x240.png3.67KB4.17KB0.00%
assets/img/ui/ui-bg_flat_75_ffffff_40x100.png0.07KB0.08KB0.00%
assets/img/ui/ui-bg_highlight-soft_75_cccccc_1x100.png0.12KB0.18KB0.00%
assets/img/ui/ui-bg_glass_65_ffffff_1x400.png0.07KB0.09KB0.00%