77% ns-sending-update-email

Code Review | NS Sending Update Email for Woocommerce

WordPress plugin NS Sending Update Email for Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: ns-sending-update...
  • Plugin version: 1.2.4
  • PHP compatiblity: 5.3.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.9
  • WordPress version: 6.3.1
  • First release: Mar 23, 2018
  • Latest release: Feb 5, 2022
  • Number of updates: 29
  • Update frequency: every 48.8 days
  • Top authors: nsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,440 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.05ms] Passed 4 tests

Analyzing server-side resources used by NS Sending Update Email for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.68 ▼4.16
Dashboard /wp-admin3.41 ▲0.0645.41 ▼17.11
Posts /wp-admin/edit.php3.52 ▲0.1645.93 ▼9.26
Add New Post /wp-admin/post-new.php6.01 ▲0.1287.59 ▼1.65
Media Library /wp-admin/upload.php3.33 ▲0.1036.20 ▲3.98
Sending Update Email /wp-admin/admin.php?page=ns-sending-update-email/ns-admin-options/ns_admin_option_dashboard.php3.3030.83
/wp-admin/admin.php?page=plugineye2093.3044.03
Join the NS CLUB /wp-admin/admin.php?page=join-the-club3.1225.57

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for NS Sending Update Email for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10413.32 ▼1.361.76 ▼0.1942.41 ▼10.49
Dashboard /wp-admin2,245 ▲574.93 ▲0.06110.74 ▼4.5270.39 ▲21.69
Posts /wp-admin/edit.php2,131 ▲422.14 ▲0.1241.28 ▲5.7539.06 ▲5.02
Add New Post /wp-admin/post-new.php1,550 ▲723.11 ▲4.86776.88 ▲154.4059.32 ▲1.93
Media Library /wp-admin/upload.php1,427 ▲454.35 ▲0.17104.49 ▼0.8849.16 ▲8.40
Sending Update Email /wp-admin/admin.php?page=ns-sending-update-email/ns-admin-options/ns_admin_option_dashboard.php1,38110.02293.4455.62
/wp-admin/admin.php?page=plugineye2099031.7828.7825.01
Join the NS CLUB /wp-admin/admin.php?page=join-the-club3,26910.66405.14144.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-sending-update-email/ajax-services/ns-sue-update-status-ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-sending-update-email/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-sending-update-email/inc/ns-sue-check-woocommerce-version.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=join-the-club
    • > Deprecation (warning) in unknown
    https://www.nsthemes.com/wp-content/themes/flatsome/assets/js/flatsome.js?ver=295a0d1d1e8168b25a51f884bffa7b33 0 Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (How to enable notification email .), #2 (Email example.)
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

ns-sending-update-email/ns-plugin-home.php 85% from 13 tests

The principal PHP file in "NS Sending Update Email for Woocommerce" v. 1.2.4 is loaded by WordPress automatically on each request
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 ("ns-sending-update-email.php" instead of "ns-plugin-home.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,632 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP15122213771
CSS310222680
JavaScript23329181

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods526.32%
▷ Protected methods00.00%
▷ Private methods1473.68%
Functions26
▷ Named functions1661.54%
▷ Anonymous functions1038.46%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.02KB6.72KB▼ 66.45%
ns-admin-options/img/ns_banner_membership-500.png24.95KB26.27KB0.00%
ns-admin-options/img/ns-theme-promo.png36.29KB11.62KB▼ 67.99%
ns-admin-options/img/backend-sidebar-icon.png1.48KB0.54KB▼ 63.47%
screenshot-2.png47.87KB11.94KB▼ 75.06%