94% paydock-for-woocommerce

Code Review | PayDock for WooCommerce

WordPress plugin PayDock for WooCommerce scored 94% from 53 tests.

About plugin

  • Plugin page: paydock-for-wooco...
  • Plugin version: 1.5.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 5.8.1
  • First release: Apr 18, 2018
  • Latest release: Jan 4, 2019
  • Number of updates: 20
  • Update frequency: every 17.2 days
  • Top authors: paydock (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 3,576 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼273.12ms] Passed 4 tests

An overview of server-side resources used by PayDock for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1332.11 ▲10.63
Dashboard /wp-admin3.07 ▲0.0243.91 ▼10.42
Posts /wp-admin/edit.php3.12 ▲0.0241.60 ▲2.85
Add New Post /wp-admin/post-new.php5.44 ▲0.0180.33 ▼1,076.17
Media Library /wp-admin/upload.php3.02 ▲0.0131.09 ▼8.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

PayDock for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,673 ▲6715.86 ▲0.319.84 ▲1.7949.54 ▼1.00
Dashboard /wp-admin2,928 ▲785.87 ▲0.03138.55 ▼7.49105.09 ▼0.79
Posts /wp-admin/edit.php2,706 ▼02.68 ▼0.0165.06 ▼4.3088.02 ▼7.51
Add New Post /wp-admin/post-new.php1,653 ▼018.87 ▲0.18380.88 ▲8.17110.33 ▲3.72
Media Library /wp-admin/upload.php1,772 ▼05.00 ▼0.01152.52 ▲1.01106.85 ▼9.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway_CC' not found in wp-content/plugins/paydock-for-woocommerce/class-paydock.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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 to be fixed:
  • Screenshots: These screenshots require images: #1 (This is the widget in the WooCommerce store), #2 (Your admin panel to change the PayDock settings), #3 (This is where you get you API keys from PayDock website), #4 (Adding your payment gateway in PayDock), #5 (How to make your first charge for the newly created gateway)
You can take inspiration from this readme.txt

paydock-for-woocommerce/paydock-for-woocommerce.php Passed 13 tests

The main PHP file in "PayDock for WooCommerce" ver. 1.5.6 adds more information about the plugin and also serves as the entry point for this plugin
23 characters long description:
PayDock for WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,100 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4162119756
CSS1250179
JavaScript3396165

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity24.67
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 1.10MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png81.17KB29.87KB▼ 63.20%
screenshot-1.png129.59KB28.82KB▼ 77.76%
admin/images/afterpay.png7.73KB7.74KB0.00%
admin/images/logo.png3.57KB1.25KB▼ 65.16%
assets/logo.png3.57KB1.25KB▼ 65.16%