10% plink-payment-gateway

Code Review | Plugin Name: PLINK Payment Gateway

WordPress plugin Plugin Name: PLINK Payment Gateway scored10%from 54 tests.

About plugin

  • Plugin page: plink-payment-gat...
  • Plugin version: 2.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Sep 20, 2021
  • Latest release: Apr 26, 2022
  • Number of updates: 59
  • Update frequency: every 3.8 days
  • Top authors: plinkdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,211 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'plinkpg_activate' not found or invalid function name

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.52ms] Passed 4 tests

An overview of server-side resources used by Plugin Name: PLINK Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1845.81 ▲3.03
Dashboard /wp-admin3.49 ▲0.1449.94 ▼10.72
Posts /wp-admin/edit.php3.60 ▲0.2451.76 ▲2.81
Add New Post /wp-admin/post-new.php6.07 ▲0.1992.91 ▲7.62
Media Library /wp-admin/upload.php3.41 ▲0.1835.78 ▼1.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Name: PLINK Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.69 ▼0.521.83 ▼0.0244.77 ▲3.89
Dashboard /wp-admin2,224 ▲214.85 ▼0.0599.79 ▼6.6439.72 ▼1.61
Posts /wp-admin/edit.php2,100 ▼32.02 ▼0.0140.23 ▼1.2036.85 ▲2.55
Add New Post /wp-admin/post-new.php1,545 ▼923.17 ▲4.94677.79 ▲53.0466.73 ▲13.88
Media Library /wp-admin/upload.php1,394 ▼64.22 ▼0.0395.19 ▼6.9844.97 ▲3.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 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/plink-payment-gateway/index.php:12

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 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Plugin Name: PLINK Payment Gateway === )
You can take inspiration from this readme.txt

plink-payment-gateway/index.php 85% from 13 tests

The main file in "Plugin Name: PLINK Payment Gateway" v. 2.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("plink-payment-gateway.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,112 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3151107979
PO File16165133

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1789.47%
▷ Anonymous functions210.53%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/plink-logo.png2.12KB2.23KB0.00%