84% customer-notes-for-woocommerce

Code Review | Customer Notes for WooCommerce

WordPress plugin Customer Notes for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: customer-notes-fo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 16, 2023
  • Latest release: May 20, 2023
  • Number of updates: 7
  • Update frequency: every 2.6 days
  • Top authors: Dhruvin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /176 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.73ms] Passed 4 tests

Server-side resources used by Customer Notes for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.60 ▼3.05
Dashboard /wp-admin3.34 ▲0.0345.09 ▼12.14
Posts /wp-admin/edit.php3.39 ▲0.0346.81 ▼0.60
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.36 ▼11.14
Media Library /wp-admin/upload.php3.26 ▲0.0334.44 ▼0.00

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Customer Notes for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.53 ▼0.851.84 ▲0.1344.14 ▼2.53
Dashboard /wp-admin2,206 ▲184.88 ▼0.05105.93 ▼1.0143.67 ▼0.98
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0040.31 ▲3.5535.20 ▲2.49
Add New Post /wp-admin/post-new.php1,534 ▼823.28 ▲4.86675.74 ▲41.9348.73 ▼3.28
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0195.78 ▼1.9944.34 ▼0.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customer-notes-for-woocommerce/class-add-custom-order-metabox.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customer-notes-for-woocommerce/class-customer-notes-admin.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customer-notes-for-woocommerce/class-customer-notes-admin.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: customer notes, order notes, woocommerce, woocommerce orders

customer-notes-for-woocommerce/customer-notes-for-woocommerce.php Passed 13 tests

The primary PHP file in "Customer Notes for WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
31 characters long description:
Adds custom field for each user

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
Good job! No executable or dangerous file extensions detected152 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33182129
JavaScript16023

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin