98% virtual-downloadable-only-products-for-woocommerce

Code Review | Virtual & Downloadable products Only for WooCommerce

WordPress plugin Virtual & Downloadable products Only for WooCommerce scored 98% from 54 tests.

About plugin

  • Plugin page: virtual-downloada...
  • Plugin version: 1.05
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4+
  • WordPress version: 5.8.1
  • First release: Apr 22, 2020
  • Latest release: Sep 29, 2020
  • Number of updates: 9
  • Update frequency: every 17.8 days
  • Top authors: ttodua (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 262 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼144.53ms] Passed 4 tests

An overview of server-side resources used by Virtual & Downloadable products Only for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.08 ▲9.94
Dashboard /wp-admin3.06 ▲0.0145.60 ▲0.28
Posts /wp-admin/edit.php3.11 ▲0.0050.08 ▲0.60
Add New Post /wp-admin/post-new.php5.42 ▼0.0297.33 ▼578.91
Media Library /wp-admin/upload.php3.00 ▲0.0032.60 ▼0.08

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Virtual & Downloadable products Only for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.73 ▲0.169.27 ▲1.2048.13 ▲2.58
Dashboard /wp-admin2,967 ▲335.86 ▼0.30143.39 ▼7.24119.92 ▼0.13
Posts /wp-admin/edit.php2,736 ▼32.70 ▲0.0269.69 ▼1.6393.87 ▼3.96
Add New Post /wp-admin/post-new.php1,672 ▼1119.24 ▲0.79389.26 ▼6.43116.02 ▼1.65
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.01174.71 ▲26.96137.40 ▲8.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (screenshot)
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

virtual-downloadable-only-products-for-woocommerce/index.php 69% from 13 tests

The primary PHP file in "Virtual & Downloadable products Only for WooCommerce" version 1.05 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("virtual-downloadable-only-products-for-woocommerce.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin2 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15162

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

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