66% sendapp-notification

Code Review | SendApp Notification - Notifications on Orders and abandoned carts for WooCommerce.

WordPress plugin SendApp Notification - Notifications on Orders and abandoned carts for WooCommerce. scored66%from 54 tests.

About plugin

  • Plugin page: sendapp-notification
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 2, 2023
  • Latest release: Jul 11, 2023
  • Number of updates: 10
  • Update frequency: every 1.0 days
  • Top authors: sendapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /438 total downloads

Benchmarks

Plugin footprint 82% 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.48MB] [CPU: ▲0.45ms] Passed 4 tests

Server-side resources used by SendApp Notification - Notifications on Orders and abandoned carts for WooCommerce.
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4941.50 ▲1.40
Dashboard /wp-admin3.78 ▲0.4750.87 ▼3.94
Posts /wp-admin/edit.php3.89 ▲0.5352.47 ▲0.09
Add New Post /wp-admin/post-new.php6.36 ▲0.47101.64 ▲10.92
Media Library /wp-admin/upload.php3.70 ▲0.4741.53 ▲4.23
Message Logs /wp-admin/admin.php?page=san-message-log3.6735.80
Notification /wp-admin/admin.php?page=san3.7145.15

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics 75% from 4 tests

An overview of browser requirements for SendApp Notification - Notifications on Orders and abandoned carts for WooCommerce.
A great user experience is important, so you should focus on the following
  • Nodes: Limit the number of DOM nodes under 25,000 (currently 65,586 on /wp-admin/admin.php?page=san)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲5414.25 ▼0.281.92 ▼0.1642.29 ▼2.07
Dashboard /wp-admin2,238 ▲615.69 ▲0.0785.15 ▼13.4674.58 ▲30.10
Posts /wp-admin/edit.php2,143 ▲431.99 ▼0.0338.86 ▼0.4535.45 ▲0.18
Add New Post /wp-admin/post-new.php1,556 ▲3023.69 ▲0.79618.41 ▼106.4854.08 ▼1.04
Media Library /wp-admin/upload.php1,443 ▲434.12 ▼0.10103.60 ▲2.0377.17 ▲27.94
Message Logs /wp-admin/admin.php?page=san-message-log1,1133.4440.6067.80
Notification /wp-admin/admin.php?page=san65,58623.77633.5271.19

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=san
    • > Notice in wp-content/plugins/sendapp-notification/san-ui.php+828
    Trying to access array offset on value of type bool

SRP 0% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sendapp-notification/san-caldera.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sendapp-notification/san-cf7.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=san-message-log
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'value')" "TypeError: Cannot read properties of null (reading 'value')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sendapp-notification/assets/js/san-admin-js.js?ver=1.1.4:8:58)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=san-message-log
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Tags: There are too many tags (22 tag instead of maximum 10)
  • Screenshots: A description for screenshot #7 is missing in sendapp-notification/assets to your readme.txt
The official readme.txt might help

sendapp-notification/sendapp.php 92% from 13 tests

"SendApp Notification - Notifications on Orders and abandoned carts for WooCommerce." version 1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sendapp-notification.php" instead of "sendapp.php")

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
Everything looks great! No dangerous files found in this plugin8,710 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript107076784,526
PHP10225262,180
CSS5178221,858
PO File25462146

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity71.25
▷ Minimum class complexity2.00
▷ Maximum class complexity209.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods71
▷ Static methods11.41%
▷ Public methods6895.77%
▷ Protected methods00.00%
▷ Private methods34.23%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/select2x2.png0.51KB0.99KB0.00%
assets/img/flags.png69.20KB23.42KB▼ 66.16%
assets/img/menu.png5.23KB0.72KB▼ 86.20%
assets/img/icon.png5.86KB1.55KB▼ 73.48%
assets/img/logo.png12.55KB4.54KB▼ 63.82%