83% valorpos

Code Review | Valor Pay

WordPress plugin Valor Pay scored83%from 54 tests.

About plugin

  • Plugin page: valorpos
  • Plugin version: 7.5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 11
  • Update frequency: every 24.7 days
  • Top authors: abubacker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /488 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼7.52ms] Passed 4 tests

An overview of server-side resources used by Valor Pay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1532.81 ▼12.39
Dashboard /wp-admin3.48 ▲0.1847.07 ▼5.04
Posts /wp-admin/edit.php3.59 ▲0.2449.96 ▲2.52
Add New Post /wp-admin/post-new.php6.06 ▲0.1781.33 ▼14.33
Media Library /wp-admin/upload.php3.40 ▲0.1737.92 ▲1.69

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Valor Pay
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,454 ▼29314.30 ▲0.100.46 ▼1.2418.25 ▼25.16
Dashboard /wp-admin2,195 ▲155.66 ▲0.0591.32 ▼8.7941.77 ▼1.50
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0539.19 ▲0.5734.05 ▼1.11
Add New Post /wp-admin/post-new.php1,526 ▼023.54 ▲0.19674.04 ▼17.0371.87 ▲21.83
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.06101.81 ▲5.0342.78 ▲0.91

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/valorpos/admin/partials/wc-valorpay-admin-order-refund.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/valorpos/admin/partials/wc-valorpay-admin-failure-tracker.php:18

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 Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: credit card, payment gateway, valor pay, payment, valor paytech

valorpos/wc-valorpay.php 77% from 13 tests

The main PHP file in "Valor Pay" ver. 7.5.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("valorpos.php" instead of "wc-valorpay.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "4.5")

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 plugin2,418 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP162161,1471,735
JavaScript319118655
CSS20428

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity26.55
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods76
▷ Static methods22.63%
▷ Public methods6484.21%
▷ Protected methods56.58%
▷ Private methods79.21%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants535.71%
▷ Class constants964.29%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/ValorPay.png14.53KB6.50KB▼ 55.28%
admin/images/valorpaytech.png26.78KB11.66KB▼ 56.47%