10% xtmpay

Code Review | XTMPAY GATEWAY

WordPress plugin XTMPAY GATEWAY scored10%from 54 tests.

About plugin

  • Plugin page: xtmpay
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Jun 22, 2015
  • Number of updates: 22
  • Update frequency: every 0.3 days
  • Top authors: toaw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,679 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/xtmpay/inc/functions.php+159
    Methods with the same name as their class will not be constructors in a future version of PHP; Paginator has a deprecated constructor

Server metrics [RAM: ▼1.79MB] [CPU: ▼54.94ms] Passed 4 tests

Server-side resources used by XTMPAY GATEWAY
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.255.84 ▼29.98
Dashboard /wp-admin2.23 ▼1.126.51 ▼55.47
Posts /wp-admin/edit.php2.23 ▼1.136.68 ▼40.23
Add New Post /wp-admin/post-new.php2.23 ▼3.666.61 ▼94.08
Media Library /wp-admin/upload.php2.23 ▼1.007.62 ▼24.07
TrueMoney /wp-admin/admin.php?page=tmpay-truemoney2.235.83
XTMPAY /wp-admin/admin.php?page=tmpay-setting2.235.91

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 41 new files
Database: 2 new tables, 10 new options
New tables
wp_xtmpay_setting
wp_xtmpay_truemoney
New WordPress options
widget_recent-posts
widget_theysaidso_widget
xtmpay_licensekey
xtmlicensekey_type
theysaidso_admin_options
widget_recent-comments
db_upgraded
tmpay_db_version
xtmpay_merchant_id
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for XTMPAY GATEWAY
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲12313.71 ▼0.581.63 ▼0.0142.82 ▼2.10
Dashboard /wp-admin2,262 ▲774.93 ▼0.9297.60 ▼8.0286.04 ▲42.82
Posts /wp-admin/edit.php2,145 ▲562.02 ▼0.0139.50 ▲4.2451.92 ▲15.51
Add New Post /wp-admin/post-new.php1,577 ▲4918.08 ▼4.81655.54 ▲47.2961.19 ▲3.59
Media Library /wp-admin/upload.php1,438 ▲474.26 ▼0.0094.76 ▼5.1174.53 ▲32.87
TrueMoney /wp-admin/admin.php?page=tmpay-truemoney8772.0425.1763.24
XTMPAY /wp-admin/admin.php?page=tmpay-setting1,7296.68128.39130.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/xtmpay/inc/functions.php+159
    Methods with the same name as their class will not be constructors in a future version of PHP; Paginator has a deprecated constructor
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • xtmlicensekey_type
    • widget_recent-posts
    • tmpay_db_version
    • xtmpay_merchant_id
    • db_upgraded
    • xtmpay_licensekey

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tmpay-setting
    • > Deprecated in wp-content/plugins/xtmpay/inc/functions.php+159
    Methods with the same name as their class will not be constructors in a future version of PHP; Paginator has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tmpay-setting
    • > Deprecated in wp-content/plugins/xtmpay/inc/functions.php+9
    Function get_magic_quotes_gpc() is deprecated
    • > GET request to /wp-admin/admin.php?page=tmpay-setting
    • > Notice in wp-content/plugins/xtmpay/admin/admin_setting.php+208
    Undefined index: tab

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: truemoney, payment gateway, xtmpay, tmpay

xtmpay/xtmpay.php Passed 13 tests

This is the main PHP file of "XTMPAY GATEWAY" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
75 characters long description:
A TrueMoney payment gateway (TrueMoney cash Card). [ Service by tmpay.net ]

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
There were no executable files found in this plugin3,046 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS372692,041
PHP621323998
JavaScript30147

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.50
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants423.53%
▷ Class constants1376.47%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.21MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/setting.png133.38KB0.37KB▼ 99.72%
admin/images/truemoney.png1.32KB0.98KB▼ 26.33%
img/clear.png0.50KB0.38KB▼ 22.59%
img/search-dark.png3.18KB0.52KB▼ 83.71%
img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%