83% woo-gift-cards-lite

Code Review | Ultimate Gift Cards for WooCommerce - Create, Redeem & Manage Digital Gift Certificates with Personalized Templates

WordPress plugin Ultimate Gift Cards for WooCommerce - Create, Redeem & Manage Digital Gift Certificates with Personalized Templates scored83%from 54 tests.

About plugin

  • Plugin page: woo-gift-cards-lite
  • Plugin version: 2.6.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2018
  • Latest release: Nov 28, 2023
  • Number of updates: 132
  • Update frequency: every 15.7 days
  • Top authors: makewebbetter (69.7%)wpswings (31.06%)Otto42 (1.52%)

Code review

54 tests

User reviews

181 reviews

Install metrics

6,000+ active /150,034 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Ultimate Gift Cards for WooCommerce - Create, Redeem & Manage Digital Gift Certificates with Personalized Templates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.21 ▼4.68
Dashboard /wp-admin3.31 ▲0.0045.04 ▼3.12
Posts /wp-admin/edit.php3.36 ▲0.0046.52 ▼4.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.88 ▼10.68
Media Library /wp-admin/upload.php3.23 ▲0.0032.46 ▲2.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 105 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Ultimate Gift Cards for WooCommerce - Create, Redeem & Manage Digital Gift Certificates with Personalized Templates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.34 ▲0.071.65 ▼0.0639.80 ▼7.04
Dashboard /wp-admin2,198 ▲185.63 ▼0.0393.55 ▼0.5540.36 ▼1.88
Posts /wp-admin/edit.php2,103 ▼01.95 ▼0.0140.20 ▼2.7137.22 ▲5.46
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▼0.16647.46 ▲35.4058.48 ▲4.69
Media Library /wp-admin/upload.php1,403 ▼04.21 ▲0.0296.08 ▼4.8541.77 ▼3.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_screen() in wp-content/plugins/woo-gift-cards-lite/includes/extra-templates/wpswings-onboarding-template-display.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: gift certificates, gift cards woocommerce, gift, gifts, certificate...

woo-gift-cards-lite/woocommerce_gift_cards_lite.php 77% from 13 tests

The main PHP script in "Ultimate Gift Cards for WooCommerce - Create, Redeem & Manage Digital Gift Certificates with Personalized Templates" version 2.6.4 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 407 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-gift-cards-lite.php" instead of "woocommerce_gift_cards_lite.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.1.0" instead of "5.5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected13,821 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP391,0882,3609,193
CSS4288732,490
JavaScript13142881,295
PO File1353408813
SVG51021
XML1009

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity113.64
▷ Minimum class complexity1.00
▷ Maximum class complexity528.00
Average method complexity8.76
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods159
▷ Static methods10.63%
▷ Public methods15194.97%
▷ Protected methods21.26%
▷ Private methods63.77%
Functions36
▷ Named functions3494.44%
▷ Anonymous functions25.56%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
31 PNG files occupy 1.94MB with 0.93MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wps-feature3.png22.57KB9.21KB▼ 59.19%
assets/images/featur4.png20.94KB8.60KB▼ 58.95%
assets/images/skype_logo.png0.93KB0.96KB0.00%
assets/images/mwb.png475.61KB187.41KB▼ 60.60%
assets/images/featur1.png19.99KB7.80KB▼ 60.99%