78% vindi-woocommerce-subscriptions

Code Review | Vindi WooCommerce

WordPress plugin Vindi WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: vindi-woocommerce...
  • Plugin version: 5.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3.2
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Jan 31, 2020
  • Number of updates: 81
  • Update frequency: every 18.6 days
  • Top authors: erico.pedroso (46.91%)laertejr (27.16%)lyoncesar (23.46%)rrebelatto (3.7%)rtakauti (2.47%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /14,967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Vindi WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.21 ▼4.80
Dashboard /wp-admin3.31 ▲0.0144.94 ▼1.59
Posts /wp-admin/edit.php3.42 ▲0.0748.83 ▼1.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.20 ▼14.71
Media Library /wp-admin/upload.php3.23 ▲0.0031.21 ▼0.44

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Vindi WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.23 ▼1.151.79 ▲0.0845.43 ▲7.48
Dashboard /wp-admin2,210 ▲225.80 ▲0.89102.06 ▼4.4640.55 ▼2.69
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0137.06 ▼6.1137.44 ▲1.72
Add New Post /wp-admin/post-new.php1,425 ▼10922.19 ▼1.08557.24 ▼98.2442.95 ▼7.21
Media Library /wp-admin/upload.php1,395 ▲74.32 ▲0.1398.34 ▲3.5037.66 ▼2.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-wcs-disable-renewal.php
    • > /wp-content/plugins/vindi-woocommerce-subscriptions/vindi-woocommerce-subscriptions.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-dependencies.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Vindi_Base_Gateway' not found in wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-bank-slip-gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Vindi_Base_Gateway' not found in wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-creditcard-gateway.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-dependencies.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-base-gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_API' not found in wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-settings.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-dependencies.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Product_Subscription' not found in wp-content/plugins/vindi-woocommerce-subscriptions/includes/class-vindi-product-subscription.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

vindi-woocommerce-subscriptions/vindi-woocommerce-subscriptions.php 92% from 13 tests

"Vindi WooCommerce" version 5.5.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,664 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP226147922,615
JavaScript29049

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.92
▷ Minimum class complexity2.00
▷ Maximum class complexity79.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods179
▷ Static methods126.70%
▷ Public methods12770.95%
▷ Protected methods2312.85%
▷ Private methods2916.20%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.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
No PNG images were found in this plugin