93% salequick-payment-gateway

Code Review | SaleQuick for WooCommerce

WordPress plugin SaleQuick for WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: salequick-payment...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 5.8.1
  • First release: Sep 28, 2020
  • Latest release: Apr 2, 2021
  • Number of updates: 6
  • Update frequency: every 31.7 days
  • Top authors: sqdev007 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 134 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Server-side resources used by SaleQuick for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0133.80 ▲3.44
Dashboard /wp-admin3.06 ▲0.0150.11 ▲3.68
Posts /wp-admin/edit.php3.12 ▼0.0043.03 ▼9.41
Add New Post /wp-admin/post-new.php5.42 ▼0.0186.94 ▼553.29
Media Library /wp-admin/upload.php3.01 ▲0.0133.85 ▲0.96

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for SaleQuick for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲6515.81 ▲0.447.51 ▼0.6749.84 ▼1.79
Dashboard /wp-admin2,973 ▲425.91 ▼0.18133.66 ▲0.76113.43 ▼4.05
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0163.31 ▼4.43100.74 ▲7.94
Add New Post /wp-admin/post-new.php1,500 ▼18318.49 ▼0.26358.27 ▼15.17112.45 ▲0.20
Media Library /wp-admin/upload.php1,810 ▲35.07 ▲0.06153.44 ▲9.22121.84 ▲7.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/salequick-payment-gateway/salequick-woocommerce-gateway.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/salequick-payment-gateway/salequick-woocommerce.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Requires php: Invalid plugin version format
You can take inspiration from this readme.txt

salequick-payment-gateway/salequick-woocommerce-gateway.php 85% from 13 tests

"SaleQuick for WooCommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("salequick-payment-gateway.php" instead of "salequick-woocommerce-gateway.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected163 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25042163

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin