83% uranx-crypto-payment

Code Review | UranX - Crypto Payments

WordPress plugin UranX - Crypto Payments scored83%from 54 tests.

About plugin

  • Plugin page: uranx-crypto-payment
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2022
  • Latest release: Jan 4, 2023
  • Number of updates: 15
  • Update frequency: every 6.9 days
  • Top authors: uranx (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,019 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: ▲0.53ms] Passed 4 tests

This is a short check of server-side resources used by UranX - Crypto Payments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.51 ▲1.95
Dashboard /wp-admin3.35 ▲0.0451.41 ▲2.55
Posts /wp-admin/edit.php3.40 ▲0.0452.28 ▲3.33
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.00 ▼3.33
Media Library /wp-admin/upload.php3.27 ▲0.0437.55 ▲0.96

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for UranX - Crypto Payments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.33 ▼0.331.61 ▼0.6343.83 ▼1.44
Dashboard /wp-admin2,198 ▲185.63 ▲0.0791.11 ▼1.8940.94 ▼0.58
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0139.61 ▲3.8436.27 ▼2.75
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▲0.09665.13 ▲17.2055.17 ▲1.30
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.05111.69 ▲5.0945.75 ▲2.53

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/uranx-crypto-payment/index.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/uranx-crypto-payment/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (UranX Payment option in Store checkout page), #2 (UranX Configurations page)
You can look at the official readme.txt

uranx-crypto-payment/index.php 85% from 13 tests

The principal PHP file in "UranX - Crypto Payments" v. 1.2.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("uranx-crypto-payment.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin231 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15523231

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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
assets/img/logo.png6.18KB2.45KB▼ 60.43%