10% urubutopay

Code Review | UrubutoPay

WordPress plugin UrubutoPay scored10%from 54 tests.

About plugin

  • Plugin page: urubutopay
  • Plugin version: 1.0
  • PHP compatiblity: 8.2+
  • PHP version: 7.4.16
  • WordPress compatibility: PHP 7-6.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2023
  • Latest release: Oct 11, 2023
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: bktechouse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /28 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/urubutopay/src/includes/urubutopay-products.php+97
    Undefined index: urubutopay_price_class_nonce

Server metrics [RAM: ▼10.15MB] [CPU: ▼2,030,012.85ms] Passed 4 tests

This is a short check of server-side resources used by UrubutoPay
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▼38.9143.72 ▼8,120,018.05
Dashboard /wp-admin42.81 ▲39.468,129,574.24 ▲8,129,524.45
Posts /wp-admin/edit.php3.79 ▲0.3951.15 ▲0.04
Add New Post /wp-admin/post-new.php3.53 ▼2.4149.90 ▼71.77
Media Library /wp-admin/upload.php3.60 ▲0.3377.26 ▲38.40
Settings /wp-admin/edit.php?post_type=urubutopay_products&page=urubutopay_setting_page3.5738.61
Add New Product /wp-admin/post-new.php?post_type=urubutopay_products3.5238.74
Payments /wp-admin/edit.php?post_type=urubutopay_payments3.7139.35
Products /wp-admin/edit.php?post_type=urubutopay_products3.7142.37

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 62 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

UrubutoPay: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲21414.80 ▲1.5821.67 ▲17.63105.52 ▲66.31
Dashboard /wp-admin2,240 ▲665.64 ▼0.0285.63 ▼2.2741.98 ▼2.06
Posts /wp-admin/edit.php2,139 ▲421.97 ▼0.0137.66 ▲1.0533.75 ▼2.06
Add New Post /wp-admin/post-new.php1,561 ▲3523.31 ▼0.19678.21 ▲7.6366.39 ▲15.49
Media Library /wp-admin/upload.php1,442 ▲424.18 ▲0.07108.39 ▼6.7352.78 ▲5.06
Settings /wp-admin/edit.php?post_type=urubutopay_products&page=urubutopay_setting_page9472.0131.0733.77
Add New Product /wp-admin/post-new.php?post_type=urubutopay_products2,2397.53182.6363.67
Payments /wp-admin/edit.php?post_type=urubutopay_payments1,1371.9133.1833.03
Products /wp-admin/edit.php?post_type=urubutopay_products1,1221.9233.9430.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 47 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=urubutopay_products
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 47 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=urubutopay_products
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/post-new.php?post_type=urubutopay_products
    • > Notice in wp-content/plugins/urubutopay/src/includes/urubutopay-products.php+97
    Undefined index: urubutopay_price_class_nonce

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 to be fixed:
  • Requires at least: Invalid version format
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can take inspiration from this readme.txt

urubutopay/urubutopay.php 85% from 13 tests

Analyzing the main PHP file in "UrubutoPay" version 1.0
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "PHP 7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected4,084 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP385698712,855
Markdown21350445
CSS1616337
JavaScript1545269
JSON300133
SVG50045

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.68
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods136
▷ Static methods4432.35%
▷ Public methods11584.56%
▷ Protected methods00.00%
▷ Private methods2115.44%
Functions11
▷ Named functions545.45%
▷ Anonymous functions654.55%
Constants24
▷ Global constants1562.50%
▷ Class constants937.50%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.24MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/screenshots/screenshot-1.png81.44KB33.52KB▼ 58.84%
public/images/screenshots/banner-772x250.png20.13KB9.04KB▼ 55.09%
public/images/payment/success.png5.33KB2.86KB▼ 46.37%
public/images/payment/failed.png4.50KB2.12KB▼ 52.91%
public/images/screenshots/screenshot-2.png134.38KB54.06KB▼ 59.77%