90% payment-gateway-for-strowallet-on-woo

Code Review | strowallet Payment Gateway for Woo

WordPress plugin strowallet Payment Gateway for Woo scored 90% from 54 tests.

About plugin

  • Plugin page: payment-gateway-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.3
  • WordPress version: 6.3.1
  • First release: Nov 6, 2022
  • Latest release: Nov 6, 2022
  • Number of updates: 2
  • Update frequency: every 4.0 days
  • Top authors: strowallet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 143 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.24ms] Passed 4 tests

Analyzing server-side resources used by strowallet Payment Gateway for Woo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.72 ▼12.79
Dashboard /wp-admin3.31 ▲0.0047.48 ▲0.83
Posts /wp-admin/edit.php3.36 ▲0.0047.90 ▼1.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.81 ▼11.75
Media Library /wp-admin/upload.php3.23 ▲0.0036.41 ▲4.59

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by strowallet Payment Gateway for Woo
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.69 ▼0.581.94 ▼0.6842.33 ▼2.87
Dashboard /wp-admin2,206 ▲185.91 ▲0.03106.78 ▲2.9542.30 ▼3.67
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0439.10 ▼1.0035.02 ▼1.57
Add New Post /wp-admin/post-new.php1,537 ▲2323.40 ▲5.90590.53 ▼8.7150.68 ▼11.39
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0294.94 ▼3.2543.21 ▼0.20

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

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
3 plugin tags: payment, woo, strowallet

payment-gateway-for-strowallet-on-woo/strowallet-woo-payment-gateway.php 92% from 13 tests

The main file in "strowallet Payment Gateway for Woo" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("payment-gateway-for-strowallet-on-woo.php" instead of "strowallet-woo-payment-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin355 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP287118324
JavaScript192631

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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/strowallet.png37.87KB11.89KB▼ 68.60%