83% ves-payment

Code Review | VES Payment

WordPress plugin VES Payment scored83%from 54 tests.

About plugin

  • Plugin page: ves-payment
  • Plugin version: 3.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2022
  • Latest release: Dec 16, 2022
  • Number of updates: 3
  • Update frequency: every 2.7 days
  • Top authors: vesplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /123 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.00MB] [CPU: ▼8.07ms] Passed 4 tests

This is a short check of server-side resources used by VES Payment
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.97 ▲3.44
Dashboard /wp-admin3.32 ▼0.0350.40 ▼16.78
Posts /wp-admin/edit.php3.37 ▲0.0148.80 ▼0.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.30 ▼15.10
Media Library /wp-admin/upload.php3.24 ▲0.0135.57 ▲0.55

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

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

Browser metrics Passed 4 tests

A check of browser resources used by VES Payment
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.78 ▲0.101.72 ▼0.0846.66 ▲4.00
Dashboard /wp-admin2,224 ▲185.86 ▲0.9897.78 ▼11.8840.60 ▼1.32
Posts /wp-admin/edit.php2,100 ▼32.03 ▼0.0338.65 ▼1.0335.44 ▼2.62
Add New Post /wp-admin/post-new.php1,545 ▲1423.32 ▲0.09654.42 ▲6.9563.94 ▲8.82
Media Library /wp-admin/upload.php1,403 ▼04.29 ▲0.09100.67 ▼1.9544.53 ▼0.55

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 does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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 | 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/ves-payment/src/vespay.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === VES Payment === )
You can take inspiration from this readme.txt

ves-payment/index.php 77% from 13 tests

Analyzing the main PHP file in "VES Payment" version 3.1.3
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ves-payment.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 167 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.3" instead of "4.3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected212 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25530212

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity5.57
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin