84% woo-greenlight-payments-gateway

Code Review | Payments Gateway for Greenlight on WooCommerce

WordPress plugin Payments Gateway for Greenlight on WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-greenlight-pa...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2
  • WordPress version: 6.3.1
  • First release: Aug 5, 2019
  • Latest release: Aug 6, 2019
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: annexcore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /433 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
Install script ran successfully

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

An overview of server-side resources used by Payments Gateway for Greenlight on WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.95 ▼5.42
Dashboard /wp-admin3.31 ▲0.0147.12 ▼3.20
Posts /wp-admin/edit.php3.36 ▲0.0146.91 ▼4.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.82 ▼11.54
Media Library /wp-admin/upload.php3.24 ▲0.0138.29 ▲5.14

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Payments Gateway for Greenlight on WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.141.76 ▼0.2540.12 ▼13.76
Dashboard /wp-admin2,206 ▲184.84 ▼0.03103.61 ▼8.8840.46 ▲0.96
Posts /wp-admin/edit.php2,086 ▼32.03 ▼0.0335.43 ▼6.9032.13 ▼2.69
Add New Post /wp-admin/post-new.php1,514 ▼517.50 ▼5.66654.43 ▲1.2757.50 ▼0.09
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0193.88 ▼3.7540.69 ▼2.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway_CC' not found in wp-content/plugins/woo-greenlight-payments-gateway/classes/class-wc-greenlight-payments.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: payment-gateway, woocommerce

woo-greenlight-payments-gateway/woo-greenlight-payments-gateway.php Passed 13 tests

The primary PHP file in "Payments Gateway for Greenlight on WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
43 characters long description:
Receive payments using Greenlight Payments.

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 plugin275 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23449255
Markdown14020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods545.45%
▷ Protected methods654.55%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected