74% wemail

Code Review | weMail - Email Marketing, Newsletter, Optin Forms, Subscribers WordPress Plugin

WordPress plugin weMail - Email Marketing, Newsletter, Optin Forms, Subscribers WordPress Plugin scored74%from 54 tests.

About plugin

  • Plugin page: wemail
  • Plugin version: 1.14.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 4, 2019
  • Latest release: Sep 11, 2023
  • Number of updates: 80
  • Update frequency: every 21.0 days
  • Top authors: tareq1988 (65%)jayontasarkar (36.25%)

Code review

54 tests

User reviews

21 reviews

Install metrics

10,000+ active /321,011 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.68MB] [CPU: ▲13.35ms] Passed 4 tests

An overview of server-side resources used by weMail - Email Marketing, Newsletter, Optin Forms, Subscribers WordPress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.11 ▲1.6553.31 ▲9.05
Dashboard /wp-admin5.05 ▲1.7563.10 ▲7.75
Posts /wp-admin/edit.php5.01 ▲1.6567.00 ▲20.11
Add New Post /wp-admin/post-new.php8.05 ▲2.17109.93 ▲16.50
Media Library /wp-admin/upload.php4.88 ▲1.6558.77 ▲24.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 406 new files
Database: 1 new table, 9 new options
New tables
wp_wemail_forms
New WordPress options
theysaidso_admin_options
wemail_version
can_compress_scripts
widget_wemail-form-widget
wemail_installed_time
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by weMail - Email Marketing, Newsletter, Optin Forms, Subscribers WordPress Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲12013.26 ▼1.121.68 ▼0.4440.04 ▼4.16
Dashboard /wp-admin2,282 ▲975.87 ▲0.0698.86 ▼20.4081.35 ▲37.07
Posts /wp-admin/edit.php2,180 ▲882.06 ▲0.0540.21 ▲2.2935.34 ▲0.15
Add New Post /wp-admin/post-new.php6,423 ▲4,88728.29 ▲5.06953.82 ▲294.3139.79 ▼14.15
Media Library /wp-admin/upload.php1,467 ▲824.30 ▲0.10111.16 ▲2.0574.42 ▲28.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Zombie tables were found after uninstall: 1 table
    • wp_wemail_forms
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • wemail_version
    • wemail_installed_time
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wemail-form-widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 309× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPMailer' not found in wp-content/plugins/wemail/includes/Core/Mail/WeMailMailer54.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wemail/i18n/countries/states/BH.php:11
    • > PHP Fatal error
      Trait 'WeDevs\\WeMail\\Traits\\Hooker' not found in wp-content/plugins/wemail/includes/Admin/Scripts.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wemail/i18n/countries/states/KE.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wemail/i18n/countries/states/TL.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wemail/i18n/countries/states/IL.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wemail/i18n/countries/states/SZ.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wemail/i18n/countries/states/TR.php:11
    • > PHP Fatal error
      Trait 'WeDevs\\WeMail\\Traits\\Singleton' not found in wp-content/plugins/wemail/includes/Core/Ecommerce/Settings.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wemail/i18n/countries/states/UA.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #20, #8, #9 in wemail/assets to your readme.txt
You can look at the official readme.txt

wemail/wemail.php 92% from 13 tests

The primary PHP file in "weMail - Email Marketing, Newsletter, Optin Forms, Subscribers WordPress Plugin" version 1.14.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/i18n/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin24,629 lines of code in 397 files:
LanguageFilesBlank linesComment linesLines of code
PHP3743,8058,79422,315
Markdown443101,181
JSON500445
SVG401241
CSS3255149
HTML1133120
XML161195
JavaScript45051
YAML16032

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.99
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces58
Interfaces1
Traits10
Classes141
▷ Abstract classes53.55%
▷ Concrete classes13696.45%
▷ Final classes21.47%
Methods969
▷ Static methods959.80%
▷ Public methods78981.42%
▷ Protected methods10110.42%
▷ Private methods798.15%
Functions150
▷ Named functions9664.00%
▷ Anonymous functions5436.00%
Constants85
▷ Global constants1416.47%
▷ Class constants7183.53%
▷ Public constants7098.59%

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
PNG images were not found in this plugin