83% onvo-pay

Code Review | ONVO Pay

WordPress plugin ONVO Pay scored83%from 54 tests.

About plugin

  • Plugin page: onvo-pay
  • Plugin version: 0.9.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 24, 2022
  • Latest release: Nov 3, 2023
  • Number of updates: 44
  • Update frequency: every 8.6 days
  • Top authors: onvopay (65.91%)rommelxcastro (36.36%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,583 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by ONVO Pay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.02 ▼3.91
Dashboard /wp-admin3.31 ▲0.0043.76 ▼1.65
Posts /wp-admin/edit.php3.36 ▲0.0044.11 ▼1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.63 ▲6.13
Media Library /wp-admin/upload.php3.23 ▲0.0034.58 ▲1.10

Server storage [IO: ▲0.79MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ONVO Pay
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.45 ▼0.122.23 ▲0.5045.04 ▲4.09
Dashboard /wp-admin2,195 ▲155.56 ▼0.1181.76 ▼11.3138.55 ▲1.25
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0335.16 ▼3.6033.94 ▼3.62
Add New Post /wp-admin/post-new.php1,531 ▲323.14 ▼0.03585.56 ▼112.2453.25 ▼7.98
Media Library /wp-admin/upload.php1,400 ▲34.21 ▼0.0297.29 ▲2.2341.76 ▼2.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'MyCLabs\\Enum\\Enum' not found in wp-content/plugins/onvo-pay/includes/subscription-payment-behavior.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MyCLabs\\Enum\\Enum' not found in wp-content/plugins/onvo-pay/includes/currency.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Stringable' not found in wp-content/plugins/onvo-pay/vendor/myclabs/php-enum/src/Enum.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'SebastianBergmann\\Comparator\\Comparator' not found in wp-content/plugins/onvo-pay/vendor/myclabs/php-enum/src/PHPUnit/Comparator.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ONVO\\Compatibility\\WooCommerce_All_Products_for_Subscriptions\\add_filter() in wp-content/plugins/onvo-pay/includes/compatibility/woocommerce-all-products-for-subscriptions.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'MyCLabs\\Enum\\Enum' not found in wp-content/plugins/onvo-pay/includes/subscription-status.php:5

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 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

onvo-pay/onvo-pay-gateway.php 69% from 13 tests

The primary PHP file in "ONVO Pay" version 0.9.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 163 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("onvo-pay.php" instead of "onvo-pay-gateway.php")
  • Requires at least: Required version must match the one declared in readme.txt ("6.2" instead of "4.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected2,607 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP305479822,179
JavaScript1363163
Markdown2480157
JSON200108

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.37
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes16.25%
Methods180
▷ Static methods4122.78%
▷ Public methods16491.11%
▷ Protected methods21.11%
▷ Private methods147.78%
Functions22
▷ Named functions2090.91%
▷ Anonymous functions29.09%
Constants16
▷ Global constants425.00%
▷ Class constants1275.00%
▷ Public constants1083.33%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.66MB with 0.48MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-256x256.png19.04KB6.54KB▼ 65.64%
assets/images/screenshot-2.png202.12KB50.68KB▼ 74.92%
assets/images/screenshot-3.png200.10KB49.42KB▼ 75.30%
assets/images/screenshot-1.png255.81KB60.98KB▼ 76.16%