79% download-renewals-for-woocommerce

Code Review | Download Renewals for WooCommerce

WordPress plugin Download Renewals for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: download-renewals...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2021
  • Latest release: Apr 20, 2022
  • Number of updates: 7
  • Update frequency: every 56.1 days
  • Top authors: deviodigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Download Renewals for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.85 ▼1.59
Dashboard /wp-admin3.33 ▼0.0253.27 ▼10.24
Posts /wp-admin/edit.php3.38 ▲0.0250.90 ▼3.55
Add New Post /wp-admin/post-new.php5.91 ▲0.0297.00 ▼9.77
Media Library /wp-admin/upload.php3.25 ▲0.0244.55 ▲5.38

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

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

Browser metrics Passed 4 tests

Download Renewals for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.34 ▼1.035.59 ▲3.2242.34 ▼4.79
Dashboard /wp-admin2,221 ▲274.83 ▼1.03104.11 ▲2.0738.63 ▼1.03
Posts /wp-admin/edit.php2,078 ▼252.01 ▲0.0439.01 ▲3.5034.30 ▼2.06
Add New Post /wp-admin/post-new.php1,550 ▲223.28 ▲0.13663.16 ▲14.6161.46 ▼26.00
Media Library /wp-admin/upload.php1,400 ▲34.12 ▼0.13114.31 ▲1.3450.30 ▲3.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/download-renewals-for-woocommerce/public/partials/download-renewals-for-woocommerce-public-display.php
    • > /wp-content/plugins/download-renewals-for-woocommerce/admin/partials/download-renewals-for-woocommerce-admin-display.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/download-renewals-for-woocommerce/includes/drwc-core-functions.php:250
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/admin/class-download-renewals-for-woocommerce-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/download-renewals-for-woocommerce.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/includes/drwc-woocommerce-emails.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/includes/drwc-woocommerce-product-fields.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/includes/drwc-background-functions.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/admin/download-renewals-for-woocommerce-settings-page.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/includes/emails/templates/plain/wc-order-download-expired.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/includes/emails/templates/wc-order-download-expired.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/download-renewals-for-woocommerce/includes/drwc-woocommerce-renewal-price-change.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: subscription, woocommerce, renewals, recurring, downloads

download-renewals-for-woocommerce/download-renewals-for-woocommerce.php Passed 13 tests

The principal PHP file in "Download Renewals for WooCommerce" v. 1.0.2 is loaded by WordPress automatically on each request
75 characters long description:
Sell digital products and remind your customers when their downloads expire

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,320 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP233891,2301,183
PO File14649128
JavaScript24546
Markdown1103
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.70
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods61
▷ Static methods23.28%
▷ Public methods5691.80%
▷ Protected methods00.00%
▷ Private methods58.20%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin