83% woo-virtualcoin-services-gateway

Code Review | WooCommerce VirtualCoin Services Gateway

WordPress plugin WooCommerce VirtualCoin Services Gateway scored83%from 54 tests.

About plugin

  • Plugin page: woo-virtualcoin-s...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 28, 2017
  • Latest release: Jun 7, 2018
  • Number of updates: 13
  • Update frequency: every 24.2 days
  • Top authors: pinovero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,646 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WooCommerce VirtualCoin Services Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.77 ▼3.34
Dashboard /wp-admin3.32 ▼0.0344.57 ▼17.39
Posts /wp-admin/edit.php3.37 ▲0.0145.99 ▼4.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.48 ▼12.96
Media Library /wp-admin/upload.php3.24 ▲0.0135.77 ▲1.20

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce VirtualCoin Services Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.27 ▼1.114.84 ▲3.1840.98 ▼8.49
Dashboard /wp-admin2,206 ▲184.84 ▼1.04111.73 ▼5.1838.09 ▼4.22
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0240.24 ▲2.6434.24 ▼0.72
Add New Post /wp-admin/post-new.php1,542 ▲418.13 ▼5.19609.96 ▼94.7951.08 ▼11.70
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0095.96 ▼17.2640.82 ▼5.11

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-virtualcoin-services-gateway/classes/vcsg.class.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/woo-virtualcoin-services-gateway/gateway-vcsg.php:14

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 87% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: A description for screenshot #1 is missing in woo-virtualcoin-services-gateway/assets to your readme.txt
Please take inspiration from this readme.txt

woo-virtualcoin-services-gateway/gateway-vcsg.php 85% from 13 tests

The principal PHP file in "WooCommerce VirtualCoin Services Gateway" v. 1.0.7 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-virtualcoin-services-gateway.php" instead of "gateway-vcsg.php")

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
No dangerous file extensions were detected338 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP377119338

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity25.50
▷ Minimum class complexity4.00
▷ Maximum class complexity47.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png6.38KB2.53KB▼ 60.39%
assets/images/vcs-logo.png15.09KB4.43KB▼ 70.66%