90% wc-sparco-payment-gateway

Code Review | Payment Gateway for Sparco on WooCommerce

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

About plugin

  • Plugin page: wc-sparco-payment...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Mar 11, 2021
  • Latest release: Mar 11, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: glidematrix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Payment Gateway for Sparco on WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.54 ▲5.04
Dashboard /wp-admin3.31 ▲0.0150.92 ▼4.09
Posts /wp-admin/edit.php3.36 ▲0.0052.26 ▲2.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.85 ▼11.37
Media Library /wp-admin/upload.php3.23 ▲0.0039.22 ▲2.21

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Payment Gateway for Sparco on WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.79 ▲0.572.03 ▲0.2044.24 ▼1.53
Dashboard /wp-admin2,209 ▲274.84 ▼1.04110.77 ▲2.3642.26 ▲1.44
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0234.28 ▼3.9235.41 ▼1.35
Add New Post /wp-admin/post-new.php1,533 ▲1923.43 ▼0.30705.53 ▲25.0257.62 ▲5.66
Media Library /wp-admin/upload.php1,391 ▲64.24 ▼0.0496.61 ▼3.8242.47 ▼0.92

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: mobile money, sparco, woocommerce, mastercard, zambia...

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

The main file in "Payment Gateway for Sparco on WooCommerce" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wc-sparco-payment-gateway.php" instead of "woo-sparco.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin409 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3142117400
Markdown1809

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity32.00
▷ Minimum class complexity7.00
▷ Maximum class complexity57.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1263.16%
▷ Protected methods15.26%
▷ Private methods631.58%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-icon-mini.png1.94KB1.62KB▼ 16.47%