79% vaocher-app

Code Review | VaocherApp - Gift cards/vouchers system for WordPress & WooCommerce

WordPress plugin VaocherApp - Gift cards/vouchers system for WordPress & WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: vaocher-app
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Feb 12, 2022
  • Latest release: Feb 13, 2022
  • Number of updates: 7
  • Update frequency: every 68.7 days
  • Top authors: vaocherapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▼0.30ms] Passed 4 tests

A check of server-side resources used by VaocherApp - Gift cards/vouchers system for WordPress & WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2940.93 ▲2.01
Dashboard /wp-admin3.59 ▲0.2948.13 ▲0.05
Posts /wp-admin/edit.php3.64 ▲0.2852.72 ▲5.46
Add New Post /wp-admin/post-new.php6.11 ▲0.2294.38 ▼6.51
Media Library /wp-admin/upload.php3.45 ▲0.2237.95 ▲3.23
VaocherApp /wp-admin/options-general.php?page=vaocher-app-settings3.4533.45

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

VaocherApp - Gift cards/vouchers system for WordPress & WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.35 ▲0.001.74 ▲0.1739.87 ▼0.15
Dashboard /wp-admin2,213 ▲335.62 ▼0.0289.81 ▲2.1844.18 ▲0.62
Posts /wp-admin/edit.php2,118 ▲182.05 ▲0.0240.91 ▲2.7636.44 ▲3.25
Add New Post /wp-admin/post-new.php1,543 ▲1523.10 ▲0.08598.44 ▼126.4352.74 ▼1.58
Media Library /wp-admin/upload.php1,418 ▲184.20 ▼0.0994.98 ▼11.2741.49 ▼3.02
VaocherApp /wp-admin/options-general.php?page=vaocher-app-settings8671.7923.8030.67

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/vaocher-app/views/front/cart_login_required_warning.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vaocher-app/views/front/cart_voucher_input.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'VaocherAppModelAbstract' not found in wp-content/plugins/vaocher-app/models/VaocherAppRedeemed.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vaocher-app/views/partials/diagnostics_output.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'VaocherAppView' not found in wp-content/plugins/vaocher-app/views/back/connecting.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vaocher-app/views/partials/onboarding_warning.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VaocherAppUrl' not found in wp-content/plugins/vaocher-app/views/partials/va_logo.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vaocher-app/views/partials/woocommerce_settings.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'VaocherAppView' not found in wp-content/plugins/vaocher-app/views/back/connected.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'VaocherAppModelAbstract' not found in wp-content/plugins/vaocher-app/models/VaocherAppVoucher.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'VaocherAppModelAbstract' not found in wp-content/plugins/vaocher-app/models/VaocherAppAccount.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
5 plugin tags: gift certificates, woocommerce, gift cards, gift vouchers, woo commerce

vaocher-app/vaocher-app.php Passed 13 tests

Analyzing the main PHP file in "VaocherApp - Gift cards/vouchers system for WordPress & WooCommerce" version 1.0.0
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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
No dangerous file extensions were detected1,734 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP323334981,728
JSON1004
CSS1001
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.63
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods90
▷ Static methods6370.00%
▷ Public methods7886.67%
▷ Protected methods11.11%
▷ Private methods1112.22%
Functions21
▷ Named functions1257.14%
▷ Anonymous functions942.86%
Constants11
▷ Global constants545.45%
▷ Class constants654.55%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png120.09KB37.78KB▼ 68.54%