10% icepay-online-payment-plugin-for-wp-ecommerce

Code Review | ICEPAY WP e-Commerce Online Payment plugin

WordPress plugin ICEPAY WP e-Commerce Online Payment plugin scored10%from 54 tests.

About plugin

  • Plugin page: icepay-online-pay...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2012
  • Latest release: Mar 24, 2015
  • Number of updates: 39
  • Update frequency: every 22.9 days
  • Top authors: icepay (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /6,614 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/icepay.php+34
    require_once(wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-functions.php): failed to open stream: No such file or directory

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

A check of server-side resources used by ICEPAY WP e-Commerce Online Payment plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.42 ▼9.05
Dashboard /wp-admin3.31 ▲0.0046.05 ▼1.54
Posts /wp-admin/edit.php3.36 ▲0.0049.33 ▼0.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.38 ▼5.02
Media Library /wp-admin/upload.php3.23 ▲0.0036.03 ▲4.52

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

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

Browser metrics Passed 4 tests

A check of browser resources used by ICEPAY WP e-Commerce Online Payment plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.69 ▲0.471.67 ▼3.5940.63 ▼3.70
Dashboard /wp-admin2,209 ▲185.85 ▲0.97100.14 ▼0.6440.72 ▲0.66
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0239.79 ▲5.0835.78 ▲0.99
Add New Post /wp-admin/post-new.php1,533 ▼023.14 ▲0.09673.55 ▲79.9052.58 ▼1.23
Media Library /wp-admin/upload.php1,391 ▲94.25 ▲0.0397.67 ▲1.6942.01 ▲0.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • 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
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 take a closer look at the following
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/api/paymentmethods/paypal.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/api/paymentmethods/wire.php:13
    • > PHP Warning
      require_once(wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-functions.php): failed to open stream: No such file or directory in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/icepay.php on line 34
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/api/paymentmethods/ddebit.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/templates/admin.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/api/paymentmethods/mistercash.php:13
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/icepay.php on line 34
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/api/paymentmethods/paysafecard.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/api/paymentmethods/creditcard.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Icepay_Paymentmethod' not found in wp-content/plugins/icepay-online-payment-plugin-for-wp-ecommerce/api/paymentmethods/ideal.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Too many tags (29 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

icepay-online-payment-plugin-for-wp-ecommerce/icepay.php 92% from 13 tests

The main PHP script in "ICEPAY WP e-Commerce Online Payment plugin" version 2.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("icepay-online-payment-plugin-for-wp-ecommerce.php" instead of "icepay.php")

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
Success! There were no dangerous files found in this plugin3,230 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP199372,0782,966
PO File27173197
CSS111047
JavaScript11020

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.21
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
Methods304
▷ Static methods3110.20%
▷ Public methods27490.13%
▷ Protected methods175.59%
▷ Private methods134.28%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
34 PNG files occupy 0.18MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ideal.png3.90KB2.25KB▼ 42.26%
assets/images/phone.png5.08KB2.87KB▼ 43.54%
assets/images/icepay-logo.png3.95KB3.68KB▼ 6.70%
assets/images/creditcard.png2.61KB1.83KB▼ 29.60%
assets/images/icepaybasic_paynow.png2.58KB1.80KB▼ 30.13%