90% in4x-crypto-payment

Code Review | IN4X Crypto Payment

WordPress plugin IN4X Crypto Payment scored90%from 54 tests.

About plugin

  • Plugin page: in4x-crypto-payment
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Apr 4, 2022
  • Latest release: Apr 20, 2022
  • Number of updates: 11
  • Update frequency: every 1.8 days
  • Top authors: axelsayegh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.90ms] Passed 4 tests

Server-side resources used by IN4X Crypto Payment
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.74 ▼1.05
Dashboard /wp-admin3.31 ▼0.0453.63 ▼13.68
Posts /wp-admin/edit.php3.36 ▲0.0053.69 ▲2.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.09 ▼12.26
Media Library /wp-admin/upload.php3.23 ▲0.0033.32 ▼4.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for IN4X Crypto Payment
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.171.95 ▲0.3345.03 ▲3.56
Dashboard /wp-admin2,195 ▲155.58 ▼0.1190.96 ▲1.6438.61 ▼6.14
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0436.01 ▼0.5733.41 ▼6.73
Add New Post /wp-admin/post-new.php1,531 ▼1423.14 ▼0.25598.53 ▼81.5554.45 ▼2.40
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0697.45 ▼17.9341.50 ▼10.29

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: cryptocurrency payment gateway, automatic cryptocurrency exchange, usdc, usdt, crypto payments...

in4x-crypto-payment/nx-payment.php 92% from 13 tests

The primary PHP file in "IN4X Crypto Payment" version 1.0.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("in4x-crypto-payment.php" instead of "nx-payment.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected398 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP13166298
JavaScript22049
Markdown17026
CSS13325

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
in4x_logo.png64.22KB21.21KB▼ 66.98%