84% ni-payment-reminder-for-woocommerce

Code Review | Ni Payment Reminder For WooCommerce

WordPress plugin Ni Payment Reminder For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: ni-payment-remind...
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 25, 2020
  • Latest release: Sep 24, 2023
  • Number of updates: 20
  • Update frequency: every 62.4 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /4,314 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.17ms] Passed 4 tests

Analyzing server-side resources used by Ni Payment Reminder For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0733.09 ▼8.49
Dashboard /wp-admin3.37 ▲0.0644.08 ▼8.53
Posts /wp-admin/edit.php3.42 ▲0.0645.95 ▲0.20
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.05 ▼3.73
Media Library /wp-admin/upload.php3.29 ▲0.0635.32 ▲0.07
Dashboard /wp-admin/admin.php?page=niwoopr-payment-reminder3.3331.49
Setting /wp-admin/admin.php?page=niwoopr-setting3.3638.07

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Ni Payment Reminder For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.24 ▼1.341.67 ▼0.2341.36 ▼5.52
Dashboard /wp-admin2,238 ▲504.87 ▼0.23111.35 ▲11.0142.32 ▼2.04
Posts /wp-admin/edit.php2,121 ▲292.04 ▲0.0540.89 ▲2.1137.60 ▲5.97
Add New Post /wp-admin/post-new.php1,544 ▲2723.21 ▲5.68662.10 ▲13.4154.06 ▲0.31
Media Library /wp-admin/upload.php1,414 ▲234.28 ▲0.0295.73 ▼4.7742.20 ▼0.14
Dashboard /wp-admin/admin.php?page=niwoopr-payment-reminder1,4151.8213.8372.17
Setting /wp-admin/admin.php?page=niwoopr-setting1,6436.95135.8657.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=niwoopr-payment-reminder
    • > Error in wp-content/plugins/ni-payment-reminder-for-woocommerce/includes/niwoopr-payment-reminder.php+247
    Uncaught Error: Call to undefined function wc_price() in wp-content/plugins/ni-payment-reminder-for-woocommerce/includes/niwoopr-payment-reminder.php:247
    Stack trace:
    #0 wp-content/plugins/ni-payment-reminder-for-woocommerce/includes/niwoopr-core.php(59): Ni_WooPR_Payment_Reminder->page_init()
    #1 wp-includes/class-wp-hook.php(310): Ni_WooPR_Core->add_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

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
The SRP test was a success

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Dashboard show stock analysis summary), #2 (Setting page), #3 (Order list.)
The official readme.txt might help

ni-payment-reminder-for-woocommerce/ni-payment-reminder-for-woocommerce.php Passed 13 tests

"Ni Payment Reminder For WooCommerce" version 1.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
68 characters long description:
Ni Payment Reminder for WooCommerce Plugin | Send Payment Reminders.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin2,479 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS4101731,508
PHP517151892
JavaScript3121379

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.80
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png66.38KB18.98KB▼ 71.41%
screenshot-3.png29.69KB10.99KB▼ 62.99%
screenshot-2.png32.38KB18.32KB▼ 43.42%