84% wc-upress-gw

Code Review | uPress Payment Gateway

WordPress plugin uPress Payment Gateway scored 84% from 54 tests.

About plugin

  • Plugin page: wc-upress-gw
  • Plugin version: 1.7.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 21, 2020
  • Latest release: Apr 21, 2020
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: upress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 424 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▲0.94ms] Passed 4 tests

A check of server-side resources used by uPress Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.04 ▼2.81
Dashboard /wp-admin3.40 ▲0.1051.07 ▲0.74
Posts /wp-admin/edit.php3.51 ▲0.1648.14 ▲2.52
Add New Post /wp-admin/post-new.php5.98 ▲0.1095.00 ▲6.00
Media Library /wp-admin/upload.php3.32 ▲0.0936.69 ▲3.30

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

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

Browser metrics Passed 4 tests

uPress Payment Gateway: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.74 ▲0.121.75 ▼0.0143.36 ▼1.82
Dashboard /wp-admin2,215 ▲305.84 ▲0.9495.25 ▼18.9039.82 ▼10.67
Posts /wp-admin/edit.php2,095 ▲92.00 ▲0.0339.11 ▲4.0333.96 ▼2.74
Add New Post /wp-admin/post-new.php1,539 ▲1122.96 ▼0.05598.43 ▼55.4753.65 ▼0.77
Media Library /wp-admin/upload.php1,397 ▲64.38 ▲0.0898.70 ▲2.0542.56 ▼4.19

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-upress-gw/wc-upress-gw.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: credit card, ecommerce, woocommerce, payment gateway

wc-upress-gw/wc-upress-gw.php Passed 13 tests

"uPress Payment Gateway" version 1.7.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
133 characters long description:
uPress Payment Gateway is a simple plugin which allows any user to start receiving credit card payments in a couple of button clicks.

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
Good job! No executable or dangerous file extensions detected704 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP18588530
PO File14651132
JavaScript269536
SVG2006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/american_express.png0.71KB0.53KB▼ 25.38%
images/cards.png2.11KB1.81KB▼ 14.01%
images/discover.png0.76KB0.57KB▼ 25.16%
images/upress-max-cards.png12.36KB4.66KB▼ 62.35%
images/mastercard.png0.81KB0.63KB▼ 22.18%