84% woocommerce-epdq-payment-gateway

Code Review | Barclay ePDQ payment gateway for wordpress

WordPress plugin Barclay ePDQ payment gateway for wordpress scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-epdq-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Jul 10, 2013
  • Latest release: Jan 4, 2014
  • Number of updates: 8
  • Update frequency: every 22.3 days
  • Top authors: maksbd19 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

50+ active /2,950 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Barclay ePDQ payment gateway for wordpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0130.98 ▼10.02
Dashboard /wp-admin3.31 ▲0.0145.81 ▼5.75
Posts /wp-admin/edit.php3.36 ▲0.0146.57 ▼4.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.35 ▼0.83
Media Library /wp-admin/upload.php3.23 ▲0.0037.12 ▲2.04

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Barclay ePDQ payment gateway for wordpress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.53 ▼1.061.67 ▼0.4140.17 ▼4.47
Dashboard /wp-admin2,206 ▲154.85 ▼0.07108.99 ▼10.3644.46 ▼5.36
Posts /wp-admin/edit.php2,089 ▲32.06 ▲0.0538.51 ▲0.7734.52 ▲2.48
Add New Post /wp-admin/post-new.php1,533 ▼023.39 ▲0.35652.88 ▼20.7448.06 ▼9.03
Media Library /wp-admin/upload.php1,388 ▲64.16 ▼0.0793.34 ▼11.4642.50 ▼2.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-epdq-payment-gateway/class.epdq.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-epdq-payment-gateway/woocommerce-epdq/index.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-epdq-payment-gateway/index.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-epdq-payment-gateway/woocommerce-epdq/class.epdq.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (screenshot-1.png is the screen shot of the plugin settings page from a working example.)
Please take inspiration from this readme.txt

woocommerce-epdq-payment-gateway/index.php 92% from 13 tests

The entry point to "Barclay ePDQ payment gateway for wordpress" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-epdq-payment-gateway.php" instead of "index.php")

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
No dangerous file extensions were detected1,364 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2109691,296
JavaScript1241568

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity123.00
▷ Minimum class complexity123.00
▷ Maximum class complexity123.00
Average method complexity9.71
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.20MB with 0.12MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png209.49KB88.76KB▼ 57.63%