83% pending-payment-reminder-for-woocommerce

Code Review | Pending Payment Reminder for WooCommerce

WordPress plugin Pending Payment Reminder for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: pending-payment-r...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 14, 2021
  • Latest release: Aug 19, 2021
  • Number of updates: 6
  • Update frequency: every 21.2 days
  • Top authors: blueorange589 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /1,652 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.89ms] Passed 4 tests

Analyzing server-side resources used by Pending Payment Reminder for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0147.13 ▲9.36
Dashboard /wp-admin3.32 ▲0.0148.01 ▼0.06
Posts /wp-admin/edit.php3.37 ▲0.0142.24 ▼6.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.86 ▼30.37
Media Library /wp-admin/upload.php3.25 ▲0.0137.03 ▲1.05

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Pending Payment Reminder for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.26 ▼0.361.73 ▼0.0843.98 ▲4.43
Dashboard /wp-admin2,196 ▲185.53 ▼0.1282.33 ▼23.4239.43 ▼2.34
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0534.13 ▼0.9835.60 ▼1.23
Add New Post /wp-admin/post-new.php1,541 ▲418.36 ▲0.03628.84 ▼12.1186.03 ▲17.80
Media Library /wp-admin/upload.php1,404 ▲14.20 ▼0.07103.65 ▲10.1549.49 ▲6.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'prfw_app' not found in wp-content/plugins/pending-payment-reminder-for-woocommerce/classes/handler.class.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/pending-payment-reminder-for-woocommerce/emails/class-wc-customer-pending-payment.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pending-payment-reminder-for-woocommerce/admin/views/dashboard.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: payment reminder, pending payment, email reminder

pending-payment-reminder-for-woocommerce/pending-payment-reminder.php 69% from 13 tests

"Pending Payment Reminder for WooCommerce" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Domain Path: The domain path is invalid: folder "/language" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("pending-payment-reminder-for-woocommerce.php" instead of "pending-payment-reminder.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected12,299 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,1681,5079,546
SVG7031,190
PHP17242568807
CSS413027752
Markdown1104

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods59
▷ Static methods46.78%
▷ Public methods5389.83%
▷ Protected methods00.00%
▷ Private methods610.17%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants7
▷ Global constants7100.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/lib/jqueryui/images/ui-icons_555555_256x240.png3.68KB4.18KB0.00%
admin/assets/lib/jqueryui/images/ui-icons_444444_256x240.png3.68KB4.18KB0.00%