78% icepay-woocommerce-online-payment-module

Code Review | ICEPAY WordPress WooCommerce Online Payment plugin

WordPress plugin ICEPAY WordPress WooCommerce Online Payment plugin scored78%from 54 tests.

About plugin

  • Plugin page: icepay-woocommerc...
  • Plugin version: 2.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Oct 25, 2012
  • Latest release: Sep 9, 2015
  • Number of updates: 82
  • Update frequency: every 12.7 days
  • Top authors: icepay (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

80+ active /16,366 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▲0.80ms] Passed 4 tests

This is a short check of server-side resources used by ICEPAY WordPress WooCommerce Online Payment plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6447.35 ▲2.53
Dashboard /wp-admin4.01 ▲0.7052.99 ▼0.97
Posts /wp-admin/edit.php4.06 ▲0.7056.50 ▲4.61
Add New Post /wp-admin/post-new.php6.53 ▲0.6498.00 ▼2.98
Media Library /wp-admin/upload.php3.87 ▲0.6447.70 ▲11.32

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for ICEPAY WordPress WooCommerce Online Payment plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.121.92 ▲0.2145.60 ▲1.91
Dashboard /wp-admin2,198 ▲215.62 ▼0.0491.54 ▼8.2137.92 ▼6.28
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0342.30 ▲5.8537.08 ▲3.93
Add New Post /wp-admin/post-new.php1,526 ▲12023.10 ▲5.06651.24 ▲17.8450.66 ▲9.20
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0298.25 ▼3.7243.75 ▼3.12

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

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

Smoke tests 50% 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 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/icepay-woocommerce-online-payment-module/templates/admin.php
    • > /wp-content/plugins/icepay-woocommerce-online-payment-module/templates/admin_paymentmethod.php
  • 26× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ICEPAY_Paymentmethod_Core' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/classes/placeholder/paymentmethod4.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/api/api/paymentmethods/directebank.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/api/api/paymentmethods/creditcard.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ICEPAY_Paymentmethod_Core' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/classes/placeholder/paymentmethod3.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/api/api/paymentmethods/paysafecard.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ICEPAY_Paymentmethod_Core' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/classes/placeholder/paymentmethod5.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ICEPAY_Paymentmethod_Core' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/classes/placeholder/paymentmethod7.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/api/api/paymentmethods/paypal.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/icepay-woocommerce-online-payment-module/icepay.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ICEPAY_Paymentmethod_Core' not found in wp-content/plugins/icepay-woocommerce-online-payment-module/classes/placeholder/paymentmethod1.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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:
  • Tags: Please delete some tags, you are using 29 tag instead of maximum 10
You can look at the official readme.txt

icepay-woocommerce-online-payment-module/icepay.php 92% from 13 tests

The main file in "ICEPAY WordPress WooCommerce Online Payment plugin" v. 2.3.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("icepay-woocommerce-online-payment-module.php" instead of "icepay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,168 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,0482,1493,599
PO File3161171465
JavaScript111049
Markdown213040
CSS12015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.46
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes57
▷ Abstract classes00.00%
▷ Concrete classes57100.00%
▷ Final classes00.00%
Methods348
▷ Static methods4011.49%
▷ Public methods31289.66%
▷ Protected methods154.31%
▷ Private methods216.03%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants423.53%
▷ Class constants1376.47%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
34 PNG files occupy 0.18MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/mastercard.png5.14KB2.56KB▼ 50.16%
assets/images/dankort.png3.29KB2.05KB▼ 37.73%
assets/images/icepaybasic_paynow.png2.58KB1.80KB▼ 30.13%
assets/images/visa.png2.88KB1.84KB▼ 36.00%
assets/images/diners-club-international.png5.33KB2.74KB▼ 48.52%