84% coinshare-voucher-pay-gateway

Code Review | Voucher-Pay - Coinshare Payment Gateway

WordPress plugin Voucher-Pay - Coinshare Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: coinshare-voucher...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Dec 4, 2019
  • Latest release: Dec 13, 2019
  • Number of updates: 6
  • Update frequency: every 1.7 days
  • Top authors: rocket21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,477 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.74ms] Passed 4 tests

Server-side resources used by Voucher-Pay - Coinshare Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.58 ▲1.92
Dashboard /wp-admin3.36 ▲0.0244.99 ▼14.22
Posts /wp-admin/edit.php3.41 ▲0.0647.30 ▼2.56
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.54 ▼13.56
Media Library /wp-admin/upload.php3.29 ▲0.0634.49 ▼0.60

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Voucher-Pay - Coinshare Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.64 ▼1.131.85 ▲0.1549.18 ▲10.53
Dashboard /wp-admin2,206 ▲215.90 ▲1.03107.48 ▼3.9539.10 ▼5.11
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0333.87 ▼7.0634.02 ▼5.10
Add New Post /wp-admin/post-new.php1,514 ▼1917.63 ▼5.19667.97 ▼4.8360.45 ▲7.83
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0794.22 ▼15.8343.85 ▼3.36

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/coinshare-voucher-pay-gateway/woo-coinshare-gateway-voucher-pay.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

coinshare-voucher-pay-gateway/woo-coinshare-gateway-voucher-pay.php 92% from 13 tests

The main PHP file in "Voucher-Pay - Coinshare Payment Gateway" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("coinshare-voucher-pay-gateway.php" instead of "woo-coinshare-gateway-voucher-pay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin266 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111478266

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/voucher.png3.83KB1.81KB▼ 52.75%