83% disable-downloadable-repeat-purchase-woocommerce

Code Review | Disable Downloadable Repeat Purchase - WooCommerce

WordPress plugin Disable Downloadable Repeat Purchase - WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: disable-downloada...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.5.2
  • WordPress version: 6.3.1
  • First release: May 31, 2016
  • Latest release: Sep 28, 2016
  • Number of updates: 15
  • Update frequency: every 8.0 days
  • Top authors: rwebster85 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,620 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.02MB] [CPU: ▼7.03ms] Passed 4 tests

This is a short check of server-side resources used by Disable Downloadable Repeat Purchase - WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.09 ▼6.13
Dashboard /wp-admin3.32 ▲0.0243.22 ▼4.35
Posts /wp-admin/edit.php3.37 ▲0.0248.24 ▲4.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.00 ▼13.81
Media Library /wp-admin/upload.php3.24 ▲0.0234.71 ▼3.81

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Disable Downloadable Repeat Purchase - WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.14 ▼1.311.52 ▼0.0441.28 ▲0.33
Dashboard /wp-admin2,206 ▲145.79 ▲0.8496.39 ▼9.9138.05 ▼7.78
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0235.98 ▲1.2930.40 ▼3.38
Add New Post /wp-admin/post-new.php1,534 ▲2023.06 ▲5.39693.86 ▲34.1862.98 ▲10.77
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.0296.90 ▼4.9642.80 ▲0.30

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-downloadable-repeat-purchase-woocommerce/som-disable-repeat-download.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
6 plugin tags: repeat purchase, wordpress, woocommerce, wordpressorg, downloadable...

disable-downloadable-repeat-purchase-woocommerce/som-disable-repeat-download.php 77% from 13 tests

The primary PHP file in "Disable Downloadable Repeat Purchase - WooCommerce" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("disable-downloadable-repeat-purchase-woocommerce.php" instead of "som-disable-repeat-download.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 349 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin48 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1311348

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected