83% ipint-payments-gateway

Code Review | iPint Payment Gateway

WordPress plugin iPint Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: ipint-payments-ga...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.0
  • WordPress version: 6.3.1
  • First release: Jun 16, 2022
  • Latest release: Jun 17, 2022
  • Number of updates: 5
  • Update frequency: every 2.2 days
  • Top authors: bitfia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /203 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼10.06ms] Passed 4 tests

This is a short check of server-side resources used by iPint Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0838.76 ▼6.82
Dashboard /wp-admin3.37 ▲0.0745.43 ▼2.15
Posts /wp-admin/edit.php3.48 ▲0.1345.67 ▼3.20
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.87 ▼28.06
Media Library /wp-admin/upload.php3.29 ▲0.0634.11 ▲2.84

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for iPint Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.65 ▼0.704.56 ▲2.3641.39 ▼1.14
Dashboard /wp-admin2,200 ▲125.84 ▲0.7999.21 ▼12.7137.72 ▼7.50
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0639.90 ▲3.2836.51 ▲2.37
Add New Post /wp-admin/post-new.php1,533 ▼323.14 ▲0.02667.28 ▲38.1452.19 ▼0.48
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.0697.27 ▼8.7942.79 ▲1.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_log() in wp-content/plugins/ipint-payments-gateway/templates/ipint-website-redirect-url.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to assets/Screenshot_1.png), #2 (This screen shot description corresponds to assets/Screenshot_2.png)
You can look at the official readme.txt

ipint-payments-gateway/ipint-woocommerce-gateway.php 77% from 13 tests

The primary PHP file in "iPint Payment Gateway" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ipint-payments-gateway.php" instead of "ipint-woocommerce-gateway.php")
  • Domain Path: The domain path is invalid: folder "/i18n/languages/" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin561 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP654165561

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity13.25
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods2055.56%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot_2.png51.41KB20.26KB▼ 60.59%
assets/Screenshot_1.png72.97KB28.85KB▼ 60.46%