84% inespay-payment

Code Review | Transferencia Bancaria PSD2

WordPress plugin Transferencia Bancaria PSD2 scored84%from 54 tests.

About plugin

  • Plugin page: inespay-payment
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Jan 4, 2018
  • Latest release: Feb 16, 2022
  • Number of updates: 33
  • Update frequency: every 45.8 days
  • Top authors: inespay (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,737 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.26ms] Passed 4 tests

Analyzing server-side resources used by Transferencia Bancaria PSD2
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1336.62 ▲0.48
Dashboard /wp-admin3.44 ▲0.1346.11 ▼0.14
Posts /wp-admin/edit.php3.55 ▲0.1943.81 ▼1.52
Add New Post /wp-admin/post-new.php6.02 ▲0.1379.46 ▼11.84
Media Library /wp-admin/upload.php3.36 ▲0.1337.79 ▲6.99

Server storage [IO: ▲0.06MB] [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: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Transferencia Bancaria PSD2
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.201.83 ▲0.1842.43 ▼1.71
Dashboard /wp-admin2,198 ▲185.63 ▲0.0380.88 ▼5.6739.50 ▲0.12
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0036.22 ▲1.3833.78 ▼6.30
Add New Post /wp-admin/post-new.php1,535 ▼218.23 ▲0.00625.54 ▼3.5869.69 ▲5.67
Media Library /wp-admin/upload.php1,400 ▼34.24 ▲0.0198.79 ▼2.4240.95 ▼4.82

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/inespay-payment/inespay.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: ecommerce, pasarela, psd2, pagos, checkout...

inespay-payment/inespay.php 85% from 13 tests

"Transferencia Bancaria PSD2" version 1.2'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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("inespay-payment.php" instead of "inespay.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected988 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4187140871
PO File13737117

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity30.25
▷ Minimum class complexity5.00
▷ Maximum class complexity87.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods62
▷ Static methods00.00%
▷ Public methods5588.71%
▷ Protected methods11.61%
▷ Private methods69.68%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo_extendido.png8.31KB4.50KB▼ 45.79%