83% 1if-payments-ecommerce-gateway

Code Review | 1IF Payments Gateway for WooCommerce

WordPress plugin 1IF Payments Gateway for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: 1if-payments-ecom...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Feb 6, 2023
  • Latest release: Feb 15, 2023
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: oneifdeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /216 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.00MB] [CPU: ▼7.77ms] Passed 4 tests

Server-side resources used by 1IF Payments Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.73 ▲3.74
Dashboard /wp-admin3.32 ▼0.0346.04 ▼16.34
Posts /wp-admin/edit.php3.37 ▲0.0143.29 ▼3.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.50 ▼15.27
Media Library /wp-admin/upload.php3.24 ▲0.0136.22 ▲3.92

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 206 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for 1IF Payments Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.36 ▲0.011.80 ▲0.1845.56 ▲6.51
Dashboard /wp-admin2,192 ▲115.63 ▼0.0881.98 ▼19.7636.94 ▼6.02
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.1349.74 ▲13.6033.16 ▼0.55
Add New Post /wp-admin/post-new.php1,526 ▼223.14 ▼0.11672.20 ▲13.0257.64 ▼2.66
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.01107.99 ▲6.6444.19 ▲1.23

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

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

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
Everything seems fine, however this is by no means 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
  • 57× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Cannot declare class TypeError, because the name is already in use in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/psr7/src/DroppingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/psr7/src/Uri.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/promises/src/EachPromise.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/psr7/src/AppendStream.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/1if-payments-ecommerce-gateway/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

1if-payments-ecommerce-gateway/1if-payments-gateway.php 92% from 13 tests

"1IF Payments Gateway for WooCommerce" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("1if-payments-ecommerce-gateway.php" instead of "1if-payments-gateway.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin32,916 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1562,4356,49327,978
Markdown151,16303,485
JSON12001,330
YAML522391
XML10019
Dockerfile18010
Bourne Shell1203

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity14.95
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces18
Interfaces17
Traits2
Classes102
▷ Abstract classes00.00%
▷ Concrete classes102100.00%
▷ Final classes2524.51%
Methods796
▷ Static methods17021.36%
▷ Public methods65382.04%
▷ Protected methods40.50%
▷ Private methods13917.46%
Functions167
▷ Named functions7645.51%
▷ Anonymous functions9154.49%
Constants172
▷ Global constants4224.42%
▷ Class constants13075.58%
▷ Public constants130100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin