67% notification-woocommerce

Code Review | Notification WooCommerce

WordPress plugin Notification WooCommerce scored67%from 54 tests.

About plugin

  • Plugin page: notification-wooc...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 8, 2016
  • Latest release: Aug 12, 2016
  • Number of updates: 20
  • Update frequency: every 1.9 days
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /933 total downloads

Benchmarks

Plugin footprint 65% 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.01MB] [CPU: ▼13.36ms] Passed 4 tests

An overview of server-side resources used by Notification WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.28 ▼1.36
Dashboard /wp-admin3.36 ▲0.0637.35 ▼20.42
Posts /wp-admin/edit.php3.43 ▲0.0840.08 ▼8.22
Add New Post /wp-admin/post-new.php5.61 ▼0.2873.65 ▼22.89
Media Library /wp-admin/upload.php3.37 ▲0.1436.86 ▼1.90
Cybercraft Products /wp-admin/admin.php?page=notification-woocommerce/cc-products-page.php3.3431.33
Notification WooCommerce /wp-admin/admin.php?page=notification_woocommerce3.3433.02

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
wp_wcn_notification
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
wcn_settings
db_upgraded

Browser metrics Passed 4 tests

Notification WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲15814.45 ▲0.091.82 ▼0.0944.78 ▲2.99
Dashboard /wp-admin2,319 ▲1425.08 ▼0.5094.18 ▼7.6340.36 ▼6.80
Posts /wp-admin/edit.php2,231 ▲1312.43 ▲0.4642.19 ▲5.1638.58 ▲3.46
Add New Post /wp-admin/post-new.php1,630 ▲9223.37 ▲5.08673.16 ▲46.1735.87 ▼41.03
Media Library /wp-admin/upload.php1,533 ▲1334.59 ▲0.39117.64 ▲20.8646.11 ▲4.99
Cybercraft Products /wp-admin/admin.php?page=notification-woocommerce/cc-products-page.php1,2451.9531.7723.75
Notification WooCommerce /wp-admin/admin.php?page=notification_woocommerce1,0341.9631.5527.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_wcn_notification
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • wcn_settings

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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=notification_woocommerce
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=notification_woocommerce
    • > Notice in wp-content/plugins/notification-woocommerce/admin/admin-product.php+110
    Trying to get property 'ID' of non-object
  • 42 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=notification-woocommerce/cc-products-page.php
    • > Notice in wp-content/plugins/notification-woocommerce/cc-products-page.php+33
    Trying to get property 'slug' of non-object
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=notification-woocommerce/cc-products-page.php
    • > Notice in wp-content/plugins/notification-woocommerce/cc-products-page.php+31
    Trying to get property 'name' of non-object
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=notification-woocommerce/cc-products-page.php
    • > Notice in wp-content/plugins/notification-woocommerce/cc-products-page.php+32
    Trying to get property 'short_description' of non-object

SRP 50% 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
Almost there! Just fix the following items
  • 7× 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/notification-woocommerce/cc-products-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/notification-woocommerce/inc/basic/admin/templates.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notification-woocommerce/admin/admin-product.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notification-woocommerce/admin/admin-wcn-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/notification-woocommerce/inc/basic/loader.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notification-woocommerce/inc/basic/admin/seller-admin-dashboard.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notification-woocommerce/user-public.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Screenshots: A description for screenshot #3 is missing in notification-woocommerce/assets to your readme.txt
  • Donate link: Invalid URI found ("")
The official readme.txt might help

notification-woocommerce/woocommerce-notification.php 85% from 13 tests

The primary PHP file in "Notification WooCommerce" version 0.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("notification-woocommerce.php" instead of "woocommerce-notification.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 215 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin7,094 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,0533,0946,012
PHP11239175851
LESS2128105
CSS2010102
Markdown116024

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1741.46%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants1
▷ Global constants1100.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