78% verified-pay-credit-card-payments

Code Review | Verified-Pay

WordPress plugin Verified-Pay scored78%from 54 tests.

About plugin

  • Plugin page: verified-pay-cred...
  • Plugin version: 1.0.28
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Sep 11, 2023
  • Number of updates: 61
  • Update frequency: every 4.9 days
  • Top authors: vpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /419 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.43MB] [CPU: ▼4.53ms] Passed 4 tests

A check of server-side resources used by Verified-Pay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4136.77 ▼1.25
Dashboard /wp-admin3.75 ▲0.4147.53 ▼12.24
Posts /wp-admin/edit.php3.80 ▲0.4549.96 ▲2.24
Add New Post /wp-admin/post-new.php6.34 ▲0.4595.47 ▼5.29
Media Library /wp-admin/upload.php3.68 ▲0.4537.38 ▲0.65
Verified-Pay /wp-admin/options-general.php?page=verifiedpay3.6135.07

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 70 new files
Database: no new tables, 9 new options
New WordPress options
verifiedpay_version
db_upgraded
_verifiedpay_last_check_transactions
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
verifiedpay_settings
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Verified-Pay
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲18513.65 ▼0.6311.05 ▲9.2940.88 ▼6.05
Dashboard /wp-admin2,227 ▲394.83 ▼1.05111.70 ▼3.1443.33 ▼0.63
Posts /wp-admin/edit.php2,109 ▲202.16 ▲0.1641.47 ▲4.8036.15 ▲4.18
Add New Post /wp-admin/post-new.php1,554 ▲3523.04 ▼0.06676.45 ▼12.1760.17 ▲7.49
Media Library /wp-admin/upload.php1,409 ▲214.19 ▼0.01100.70 ▼4.1446.11 ▲0.69
Verified-Pay /wp-admin/options-general.php?page=verifiedpay1,0752.3841.0225.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • _verifiedpay_last_check_transactions
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 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 0% from 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
Please fix the following
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/client/woocommerce/payFrame.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/client/woocommerce/paidMsg.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/adminNotice.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/message.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/client/RestrictContentPro/payFrame.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/client/woocommerce/payButton.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/admin/mainSettings.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/cookieConfirm.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/tpl/admin/mainSettingsWrap.php
    • > /wp-content/plugins/verified-pay-credit-card-payments/verified-pay-credit-card-payments.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant VPAY__PLUGIN_DIR - assumed 'VPAY__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/verified-pay-credit-card-payments/classes/VerifiedPay.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Vpay\\VerifiedPay\\add_filter() in wp-content/plugins/verified-pay-credit-card-payments/integrations/RestrictContentPro/restrict-entry.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/verified-pay-credit-card-payments/integrations/woocommerce/wc-entry.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/verified-pay-credit-card-payments/tpl/admin/metaboxAdvanced.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/verified-pay-credit-card-payments/tpl/client/woocommerce/paySelectForm.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/verified-pay-credit-card-payments/tpl/admin/metaboxAccount.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'VPAY__PLUGIN_DIRclasses/Settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/verified-pay-credit-card-payments/classes/VerifiedPay.php on line 5
    • > PHP Warning
      require_once(VPAY__PLUGIN_DIRclasses/Settings.php): failed to open stream: No such file or directory in wp-content/plugins/verified-pay-credit-card-payments/classes/VerifiedPay.php on line 5
    • > PHP Warning
      Use of undefined constant VPAY__PLUGIN_DIR - assumed 'VPAY__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/verified-pay-credit-card-payments/classes/gateway/VerifiedPayGateway.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/verified-pay-credit-card-payments/integrations/woocommerce/WcGateway.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: creditcard, ecommerce, shop, blog, store...

verified-pay-credit-card-payments/verified-pay-credit-card-payments.php 85% from 13 tests

The main PHP file in "Verified-Pay" ver. 1.0.28 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)
  • 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 check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,705 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP365099222,461
TypeScript13154158809
CSS26617347
JSON20046
JavaScript292932
Markdown16010

PHP code Passed 2 tests

This is a short overview 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.31
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods178
▷ Static methods2715.17%
▷ Public methods15084.27%
▷ Protected methods2514.04%
▷ Private methods31.69%
Functions12
▷ Named functions325.00%
▷ Anonymous functions975.00%
Constants22
▷ Global constants313.64%
▷ Class constants1986.36%
▷ Public constants19100.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
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/verified_48.png2.42KB1.25KB▼ 48.32%
img/verified_16.png1.32KB0.34KB▼ 74.15%
img/verified_64.png2.96KB1.35KB▼ 54.28%
img/cc_32.png6.59KB2.75KB▼ 58.32%
img/verified_32.png1.82KB0.78KB▼ 57.14%