83% vesta-guaranteed-payments

Code Review | Vesta Guaranteed Payments

WordPress plugin Vesta Guaranteed Payments scored83%from 54 tests.

About plugin

  • Plugin page: vesta-guaranteed-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2019
  • Latest release: Nov 13, 2019
  • Number of updates: 4
  • Update frequency: every 22.8 days
  • Top authors: vestaservicedelivery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /636 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.59ms] Passed 4 tests

A check of server-side resources used by Vesta Guaranteed Payments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.19 ▼7.03
Dashboard /wp-admin3.33 ▲0.0351.31 ▼2.97
Posts /wp-admin/edit.php3.38 ▲0.0247.77 ▼3.48
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.80 ▼12.88
Media Library /wp-admin/upload.php3.25 ▲0.0236.53 ▲4.26

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 42 new files
Database: 1 new table, 6 new options
New tables
wp_vesta_payment_logs
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Vesta Guaranteed Payments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.21 ▼1.181.79 ▼0.0742.33 ▼5.71
Dashboard /wp-admin2,211 ▲235.84 ▲0.9698.56 ▼10.2744.24 ▲6.39
Posts /wp-admin/edit.php2,096 ▲102.05 ▲0.0839.24 ▼1.4736.50 ▲0.96
Add New Post /wp-admin/post-new.php1,540 ▲721.99 ▼1.21667.18 ▲54.1260.96 ▲4.21
Media Library /wp-admin/upload.php1,387 ▼14.20 ▼0.02100.73 ▼11.1743.13 ▼1.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/vesta-guaranteed-payments/includes/vesta_payment_logs.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vesta-guaranteed-payments/includes/vesta_datacollector_finger_print.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/vesta-guaranteed-payments/includes/vesta_payment_logs.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vesta-guaranteed-payments/includes/vesta_payment_capture.php:21
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/class-wp-list-table.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/vesta-guaranteed-payments/includes/vesta_payment_logs.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/vesta-guaranteed-payments/includes/vesta_payment_logs.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

vesta-guaranteed-payments/vesta-guaranteed-payments.php 85% from 13 tests

The main PHP file in "Vesta Guaranteed Payments" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Description: Please don't use more than 140 characters for the plugin description (currently 275 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected3,141 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP91624981,846
CSS1637413
JavaScript55438410
XSD1414306
PO File14858110
SVG20156

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity32.00
▷ Minimum class complexity6.00
▷ Maximum class complexity97.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods58
▷ Static methods35.17%
▷ Public methods5594.83%
▷ Protected methods00.00%
▷ Private methods35.17%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/maestro.png9.75KB3.88KB▼ 60.26%
assets/images/authorizenet.png16.08KB6.55KB▼ 59.27%
assets/images/cards.png23.48KB7.71KB▼ 67.19%
assets/images/dinersclub.png6.35KB3.25KB▼ 48.74%
assets/images/discover.png5.78KB3.07KB▼ 46.82%