78% new-order-notification-for-woocommerce

Code Review | New Order Notification for Woocommerce

WordPress plugin New Order Notification for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: new-order-notific...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-6.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2019
  • Latest release: Apr 2, 2023
  • Number of updates: 59
  • Update frequency: every 23.5 days
  • Top authors: mrebabi (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active /27,761 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.00ms] Passed 4 tests

An overview of server-side resources used by New Order Notification for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.79 ▼5.36
Dashboard /wp-admin3.31 ▲0.0051.48 ▲0.81
Posts /wp-admin/edit.php3.36 ▲0.0049.79 ▲2.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.76 ▼17.59
Media Library /wp-admin/upload.php3.23 ▲0.0034.51 ▲2.38
Settings /wp-admin/admin.php?page=new_order_notification_settings3.0024.86
Support /wp-admin/admin.php?page=new_order_notification_support3.0023.84
New Order Notification /wp-admin/admin.php?page=new_order_notification3.0022.08
New Order Notification (Old) /wp-admin/admin.php?page=new_order_notification_menu3.0025.55

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by New Order Notification for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.171.72 ▼0.1139.88 ▼2.13
Dashboard /wp-admin2,200 ▲125.79 ▲0.88102.46 ▼12.4836.34 ▼7.90
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0438.41 ▼1.5635.06 ▼3.18
Add New Post /wp-admin/post-new.php1,533 ▲523.39 ▲5.13611.71 ▼26.3653.45 ▲5.29
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0593.38 ▼7.5642.28 ▼2.48
Settings /wp-admin/admin.php?page=new_order_notification_settings280.440.063.82
Support /wp-admin/admin.php?page=new_order_notification_support280.440.093.56
New Order Notification /wp-admin/admin.php?page=new_order_notification280.440.083.86
New Order Notification (Old) /wp-admin/admin.php?page=new_order_notification_menu280.440.073.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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 fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/new-order-notification-for-woocommerce/new-order-notification-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/new-order-notification-for-woocommerce/new-order-notification-page.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=new_order_notification_settings
    • > Network (severe)
    wp-admin/admin.php?page=new_order_notification_settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=new_order_notification_support
    • > Network (severe)
    wp-admin/admin.php?page=new_order_notification_support - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=new_order_notification
    • > Network (severe)
    wp-admin/admin.php?page=new_order_notification - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=new_order_notification_menu
    • > Network (severe)
    wp-admin/admin.php?page=new_order_notification_menu - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: woocommerce, woocommerce order page, woocommerce new order notification, woocommerce order notification, woocommerce notification...

new-order-notification-for-woocommerce/new-order-notification.php 85% from 13 tests

The main PHP script in "New Order Notification for Woocommerce" version 2.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("new-order-notification-for-woocommerce.php" instead of "new-order-notification.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.1" instead of "2.5")

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
Success! There were no dangerous files found in this plugin1,441 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP596561,160
CSS1474281

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected