68% admail

Code Review | AdMail - Back in-stock notifier for WooCommerce

WordPress plugin AdMail - Back in-stock notifier for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: admail
  • Plugin version: 1.5.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Apr 4, 2023
  • Latest release: Nov 22, 2023
  • Number of updates: 47
  • Update frequency: every 4.9 days
  • Top authors: aleswebs (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /1,045 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▲8.55ms] Passed 4 tests

This is a short check of server-side resources used by AdMail - Back in-stock notifier for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3444.37 ▲4.11
Dashboard /wp-admin3.61 ▲0.3057.54 ▲8.78
Posts /wp-admin/edit.php3.72 ▲0.3660.45 ▲12.97
Add New Post /wp-admin/post-new.php6.19 ▲0.30102.74 ▲9.90
Media Library /wp-admin/upload.php3.53 ▲0.3047.02 ▲11.39
Trashed /wp-admin/admin.php?page=ambisn_tab_trashed3.4945.29
All Products /wp-admin/admin.php?page=ambisn_all_products3.5141.61
Out of stock ptoducts /wp-admin/admin.php?page=ambisn_tab_ofs3.5043.15
Sent /wp-admin/admin.php?page=ambisn_tab_sent3.5044.48
Settings /wp-admin/admin.php?page=ambisn_settings3.5040.95
Available /wp-admin/admin.php?page=ambisn_tab_waiting3.5144.33
AdMail /wp-admin/admin.php?page=ambisn_error3.5041.06

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 56 new files
Database: 1 new table, 7 new options
New tables
wp_wc_admail
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
ambisn_debug_data
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for AdMail - Back in-stock notifier for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10414.24 ▼0.472.07 ▲0.4437.78 ▼5.91
Dashboard /wp-admin2,244 ▲675.59 ▲0.0396.81 ▼3.5642.62 ▲0.68
Posts /wp-admin/edit.php2,149 ▲491.98 ▲0.0341.12 ▼2.4434.96 ▼1.73
Add New Post /wp-admin/post-new.php1,535 ▼023.30 ▼1.84602.25 ▼26.0951.52 ▼22.32
Media Library /wp-admin/upload.php1,452 ▲524.24 ▲0.13100.37 ▲3.4643.62 ▼0.25
Trashed /wp-admin/admin.php?page=ambisn_tab_trashed8691.6528.7923.43
All Products /wp-admin/admin.php?page=ambisn_all_products8701.6324.8020.67
Out of stock ptoducts /wp-admin/admin.php?page=ambisn_tab_ofs8671.6525.4523.84
Sent /wp-admin/admin.php?page=ambisn_tab_sent8631.6625.9425.91
Settings /wp-admin/admin.php?page=ambisn_settings8661.6225.4825.25
Available /wp-admin/admin.php?page=ambisn_tab_waiting8661.6625.3625.46
AdMail /wp-admin/admin.php?page=ambisn_error8671.6625.9225.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_wc_admail
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • ambisn_debug_data
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/admail/includes/mail_templates/ambisn_template_template_2_free.php
    • > /wp-content/plugins/admail/includes/mail_templates/ambisn_template_template_1_free.php
  • 14× 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 plugin_dir_url() in wp-content/plugins/admail/index.php:28
    • > PHP Warning
      Use of undefined constant AMBISN_URL - assumed 'AMBISN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/admail/includes/template_preview.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ambisn_allProducts() in wp-content/plugins/admail/includes/tabs/all.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/admail/includes/mail_templates/ambisn_template_template_1_free.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/admail/includes/template_preview.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/admail/includes/mail_templates/ambisn_template_template_2_free.php:128
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admail/includes/dev-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ambisn_collected_emails() in wp-content/plugins/admail/includes/collected_emails_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/admail/includes/mail_templates/ambisn_template_default.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admail/includes/admin.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: woocommerce, subscription, stock notifications, restock alerts, product availability...

admail/index.php 77% from 13 tests

The main PHP file in "AdMail - Back in-stock notifier for WooCommerce" ver. 1.5.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("admail.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin5,402 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP17249483,290
CSS46121,425
JavaScript6510499
SVG13257188

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions81
▷ Named functions81100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/lock.png1.08KB0.98KB▼ 9.45%
assets/images/no_image.png17.19KB8.17KB▼ 52.45%
assets/images/stati_bg1.png18.83KB6.43KB▼ 65.87%
assets/images/add.png0.25KB0.18KB▼ 28.52%
assets/images/wp-logo.png16.23KB17.38KB0.00%