90% fluidcoins-wc-payment-gateway

Code Review | Fluidcoins Payment Gateway for WooCommerce

WordPress plugin Fluidcoins Payment Gateway for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: fluidcoins-wc-pay...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 8, 2021
  • Latest release: Nov 8, 2021
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: tubiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,690 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by Fluidcoins Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.46 ▲1.05
Dashboard /wp-admin3.31 ▲0.0145.35 ▼3.69
Posts /wp-admin/edit.php3.36 ▲0.0147.44 ▼4.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0198.06 ▼5.41
Media Library /wp-admin/upload.php3.24 ▲0.0137.98 ▲3.73

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Fluidcoins Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.63 ▼0.621.75 ▲0.0738.93 ▼1.54
Dashboard /wp-admin2,206 ▲185.91 ▲1.01107.70 ▼2.9541.65 ▲0.55
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0739.52 ▼2.8235.14 ▼2.06
Add New Post /wp-admin/post-new.php1,542 ▲818.22 ▼5.05589.48 ▼37.4350.52 ▲0.21
Media Library /wp-admin/upload.php1,382 ▼64.21 ▼0.0295.83 ▼4.7340.69 ▼3.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
8 plugin tags: woocommerce, bnb, fluidcoins, crypto, payment gateway...

fluidcoins-wc-payment-gateway/fluidcoins-wc-payment-gateway.php 92% from 13 tests

The main PHP file in "Fluidcoins Payment Gateway for WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "3.8.0")

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
Good job! No executable or dangerous file extensions detected507 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2194146409
JavaScript428098

PHP code Passed 2 tests

A short review 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.31
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/fluidcoins.png44.71KB12.66KB▼ 71.69%