83% woo-xrp

Code Review | WooCommerce XRP

WordPress plugin WooCommerce XRP scored83%from 54 tests.

About plugin

  • Plugin page: woo-xrp
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2019
  • Latest release: Jul 30, 2020
  • Number of updates: 10
  • Update frequency: every 49.0 days
  • Top authors: empatogen (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /1,715 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.18ms] Passed 4 tests

An overview of server-side resources used by WooCommerce XRP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.77 ▼1.93
Dashboard /wp-admin3.33 ▲0.0247.52 ▲1.91
Posts /wp-admin/edit.php3.38 ▲0.0247.95 ▼3.64
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.78 ▼10.50
Media Library /wp-admin/upload.php3.25 ▲0.0233.70 ▼4.64

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce XRP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.184.37 ▲1.9739.91 ▼4.86
Dashboard /wp-admin2,206 ▲185.89 ▲1.00102.74 ▼9.4538.75 ▲1.10
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0439.20 ▼0.2636.15 ▼3.69
Add New Post /wp-admin/post-new.php1,533 ▼123.52 ▲0.17596.46 ▼67.4839.78 ▼11.16
Media Library /wp-admin/upload.php1,385 ▲64.21 ▲0.0199.43 ▼13.6142.26 ▼6.30

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

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
Even though no errors were found, 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-xrp/views/thank_you.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-xrp/includes/class-wcxrp-gateway.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: cryptocurrency, gateway, woocommerce, woo, xrp

woo-xrp/woocommerce-xrp.php 77% from 13 tests

This is the main PHP file of "WooCommerce XRP" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-xrp.php" instead of "woocommerce-xrp.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.1" instead of "3.5.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin2,102 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP81762921,195
PO File6269296821
JavaScript26086

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity30.00
▷ Minimum class complexity2.00
▷ Maximum class complexity92.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods46
▷ Static methods12.17%
▷ Public methods2656.52%
▷ Protected methods00.00%
▷ Private methods2043.48%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected