83% instapago

Code Review | Instapago Payment Gateway for WooCommerce

WordPress plugin Instapago Payment Gateway for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: instapago
  • Plugin version: 7.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.2-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2017
  • Latest release: Oct 1, 2022
  • Number of updates: 63
  • Update frequency: every 32.9 days
  • Top authors: abr4xas (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /3,840 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.09ms] Passed 4 tests

Analyzing server-side resources used by Instapago Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.92 ▲0.57
Dashboard /wp-admin3.34 ▲0.0451.99 ▼2.02
Posts /wp-admin/edit.php3.39 ▲0.0450.89 ▲1.25
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.30 ▼17.01
Media Library /wp-admin/upload.php3.27 ▲0.0434.28 ▼5.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Instapago Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.74 ▲0.161.87 ▼0.0046.75 ▲1.74
Dashboard /wp-admin2,206 ▲154.84 ▼1.06111.36 ▲1.6042.56 ▼0.49
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0637.94 ▼3.6531.96 ▼3.36
Add New Post /wp-admin/post-new.php1,533 ▼023.11 ▼0.07622.69 ▼52.3956.09 ▼0.61
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0999.26 ▼15.7142.67 ▼6.51

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instapago/includes/admin-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/instapago/includes/payment-fields.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #4 is missing in instapago/assets to your readme.txt
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

instapago/Instapago.php 85% from 13 tests

"Instapago Payment Gateway for WooCommerce" version 7.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 363 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("instapago.php" instead of "Instapago.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected680 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP441122376
Sass15090
CSS2202286
HTML24582
JavaScript20037
Markdown1709

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/instapago-visa-mastercard.png2.64KB2.66KB0.00%
assets/images/instapago-gateway.png1.16KB1.17KB0.00%
assets/images/instapago.png47.56KB9.86KB▼ 79.27%