89% bp-new-order-notifications-for-woocommerce

Code Review | ChaChing - New Order Notifications for WooCommerce

WordPress plugin ChaChing - New Order Notifications for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: bp-new-order-noti...
  • Plugin version: 0.1
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Aug 30, 2022
  • Latest release: Aug 30, 2022
  • Number of updates: 3
  • Update frequency: every 20.0 days
  • Top authors: niloybrightvessel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.10MB] [CPU: ▲6.75ms] Passed 4 tests

This is a short check of server-side resources used by ChaChing - New Order Notifications for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.56 ▲1.1049.00 ▲8.94
Dashboard /wp-admin4.40 ▲1.1052.41 ▲3.73
Posts /wp-admin/edit.php4.51 ▲1.1655.04 ▲4.70
Add New Post /wp-admin/post-new.php6.98 ▲1.09104.28 ▲9.62
Media Library /wp-admin/upload.php4.32 ▲1.0945.54 ▲10.17
Codestar Framework /wp-admin/tools.php?page=csf-welcome4.3342.03

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 151 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for ChaChing - New Order Notifications for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.17 ▼1.191.88 ▲0.1142.55 ▼5.23
Dashboard /wp-admin2,214 ▲294.87 ▼1.03108.92 ▲3.1443.30 ▼3.06
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0139.82 ▼1.9636.19 ▲1.14
Add New Post /wp-admin/post-new.php1,549 ▲1618.34 ▼4.78605.37 ▼39.0847.38 ▼2.21
Media Library /wp-admin/upload.php1,399 ▲114.22 ▲0.05102.99 ▲3.7442.98 ▼3.09
Codestar Framework /wp-admin/tools.php?page=csf-welcome1,4173.6253.6960.92

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 were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: woocommerce notification, woocommerce order notification, woocommerce new order, woocommerce order

bp-new-order-notifications-for-woocommerce/main.php 77% from 13 tests

"ChaChing - New Order Notifications for WooCommerce" version 0.1'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:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "4.9")
  • Requires PHP: Required version must match the one declared in readme.txt ("7.4" instead of "7.2.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("bp-new-order-notifications-for-woocommerce.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected17,270 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP802,3311,21810,304
PO File203,1983,5916,500
JavaScript75723336
CSS6614107
JSON20021
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity20.08
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity5.94
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods229
▷ Static methods3716.16%
▷ Public methods22899.56%
▷ Protected methods00.00%
▷ Private methods10.44%
Functions26
▷ Named functions2388.46%
▷ Anonymous functions311.54%
Constants7
▷ Global constants7100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/bp-logo-icon.png1.09KB0.87KB▼ 20.45%
assets/img/bp-logo.png4.99KB2.68KB▼ 46.35%
include/codestar/assets/images/checkerboard.png2.29KB2.54KB0.00%