10% mail-newsletter

Code Review | Mail NewsLetter

WordPress plugin Mail NewsLetter scored10%from 54 tests.

About plugin

  • Plugin page: mail-newsletter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Mar 4, 2017
  • Latest release: Mar 5, 2017
  • Number of updates: 7
  • Update frequency: every 5.3 days
  • Top authors: ifourkuldeep1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /915 total downloads

Benchmarks

Plugin footprint 23% 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
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/mail-newsletter/mail-newsletter.php+57
    Function create_function() is deprecated

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.11ms] Passed 4 tests

Analyzing server-side resources used by Mail NewsLetter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0533.64 ▼7.88
Dashboard /wp-admin3.35 ▲0.0446.34 ▼5.89
Posts /wp-admin/edit.php3.40 ▲0.0447.75 ▲1.68
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.42 ▼12.33
Media Library /wp-admin/upload.php3.27 ▲0.0434.35 ▲2.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Mail NewsLetter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10313.33 ▼1.282.21 ▲0.3840.83 ▼2.94
Dashboard /wp-admin2,226 ▲386.02 ▲1.0099.98 ▼19.3338.07 ▼4.87
Posts /wp-admin/edit.php2,109 ▲202.04 ▼0.0139.78 ▲2.0434.83 ▲0.14
Add New Post /wp-admin/post-new.php1,540 ▲718.34 ▼4.78617.35 ▼46.4358.36 ▲3.95
Media Library /wp-admin/upload.php1,411 ▲234.24 ▲0.0597.20 ▲2.3043.14 ▲0.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Mail_Newsletter_Class::mn_deactivation_hook() should not be called statically
  • Zombie tables detected upon uninstall: 1 table
    • wp_mail_newsletter
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Admin back end to send email newsletter screenshot.) image not found
The official readme.txt might help

mail-newsletter/mail-newsletter.php Passed 13 tests

The main PHP script in "Mail NewsLetter" version 1.0 is automatically included on every request by WordPress
93 characters long description:
This plugin generate leads from website and allow admin to send email them using admin panel.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin286 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15957182
CSS19381
JavaScript15223

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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.26MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png32.87KB12.69KB▼ 61.41%
assets/banner-772x250.png103.14KB44.21KB▼ 57.14%
assets/icon-256x256.png36.88KB15.10KB▼ 59.04%
assets/screenshot-2.png75.18KB19.61KB▼ 73.92%
assets/icon-128x128.png15.45KB7.39KB▼ 52.14%