10% voucherme-for-woocommerce

Code Review | VoucherMe for WooCommerce

WordPress plugin VoucherMe for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: voucherme-for-woo...
  • Plugin version: 1.6.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Sep 16, 2021
  • Latest release: Jul 27, 2023
  • Number of updates: 8
  • Update frequency: every 84.9 days
  • Top authors: daveloftus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 669 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/voucherme-for-woocommerce/woocommerce-voucherme.php+79
    Undefined property: WC_VoucherMe::$banned_table_name

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.29ms] Passed 4 tests

An overview of server-side resources used by VoucherMe for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0455.02 ▲13.77
Dashboard /wp-admin3.33 ▲0.0350.11 ▼5.19
Posts /wp-admin/edit.php3.45 ▲0.0951.20 ▼8.30
Add New Post /wp-admin/post-new.php5.91 ▲0.03104.38 ▼11.79
Media Library /wp-admin/upload.php3.26 ▲0.0341.96 ▲4.13

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: 2 new tables, 6 new options
New tables
wp_
wp_wc_voucherme_attemtps
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for VoucherMe for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.27 ▼0.101.85 ▲0.1844.29 ▲4.40
Dashboard /wp-admin2,206 ▼04.89 ▼1.00106.08 ▼2.2438.14 ▼1.32
Posts /wp-admin/edit.php2,092 ▼02.03 ▲0.0143.28 ▲0.5236.77 ▼0.04
Add New Post /wp-admin/post-new.php1,376 ▼15817.59 ▼5.44691.81 ▲0.0847.22 ▼2.87
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.06103.56 ▲0.7741.35 ▼3.78

Uninstaller [IO: ✅] [DB: ▲0.00MB] 50% 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 does not fully uninstall, leaving 2 tables in the database
    • wp_
    • wp_wc_voucherme_attemtps
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: gift cards, gift certificates, gift vouchers, vouchers, gifts

voucherme-for-woocommerce/woocommerce-voucherme.php 77% from 13 tests

The entry point to "VoucherMe for WooCommerce" version 1.6.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("voucherme-for-woocommerce.php" instead of "woocommerce-voucherme.php")
  • 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected479 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP47614349
JavaScript211093
CSS20037

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity20.50
▷ Minimum class complexity10.00
▷ Maximum class complexity31.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2890.32%
▷ Protected methods00.00%
▷ Private methods39.68%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin