84% getpaid-wallet

Code Review | GetPaid > Wallet

WordPress plugin GetPaid > Wallet scored84%from 54 tests.

About plugin

  • Plugin page: getpaid-wallet
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2022
  • Latest release: Jun 22, 2023
  • Number of updates: 5
  • Update frequency: every 94.0 days
  • Top authors: stiofansisland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /5,035 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.92ms] Passed 4 tests

Server-side resources used by GetPaid > Wallet
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.70 ▼8.67
Dashboard /wp-admin3.42 ▲0.1244.44 ▼5.15
Posts /wp-admin/edit.php3.47 ▲0.1147.97 ▼1.30
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.19 ▼12.55
Media Library /wp-admin/upload.php3.28 ▲0.0538.05 ▲7.62
Install Plugins /wp-admin/plugins.php?page=wpinv-wallet-install-plugins3.3534.43

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 227 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for GetPaid > Wallet
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.30 ▼1.071.65 ▼0.1539.89 ▼4.37
Dashboard /wp-admin2,234 ▲434.85 ▼0.09116.68 ▲1.5443.26 ▼1.98
Posts /wp-admin/edit.php2,128 ▲392.04 ▲0.0335.90 ▼1.3437.51 ▲1.43
Add New Post /wp-admin/post-new.php1,553 ▲2523.09 ▲0.16700.60 ▲24.8152.65 ▼9.25
Media Library /wp-admin/upload.php1,421 ▲364.29 ▲0.08103.68 ▼3.5249.70 ▲3.66
Install Plugins /wp-admin/plugins.php?page=wpinv-wallet-install-plugins9622.0625.9929.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 149× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Api\\BankAccount' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ExtendedBankAccount.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Transactions.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Billing.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/TemplateSettings.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ItemList.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/PayoutSenderBatchHeader.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'PayPal\\Handler\\IPayPalHandler' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/RestHandler.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Presentation.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/CarrierAccount.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/getpaid-wallet/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/ExternalFunding.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: payment, wallet, invoicing, getpaid

getpaid-wallet/wpinv-wallet.php 92% from 13 tests

The main PHP script in "GetPaid > Wallet" version 2.0.5 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("getpaid-wallet.php" instead of "wpinv-wallet.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected17,388 lines of code in 209 files:
LanguageFilesBlank linesComment linesLines of code
PHP2033,88717,51316,488
PO File1171193461
Markdown2530274
JSON100116
XML14032
YAML10017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.17
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces17
Interfaces5
Traits2
Classes189
▷ Abstract classes31.59%
▷ Concrete classes18698.41%
▷ Final classes00.00%
Methods2,253
▷ Static methods883.91%
▷ Public methods2,20697.91%
▷ Protected methods271.20%
▷ Private methods200.89%
Functions23
▷ Named functions1982.61%
▷ Anonymous functions417.39%
Constants26
▷ Global constants415.38%
▷ Class constants2284.62%
▷ Public constants22100.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.23MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/icon-128x128.png3.26KB2.39KB▼ 26.74%
.wordpress-org/banner-1544x500.png122.72KB47.08KB▼ 61.64%
.wordpress-org/screenshot-2.png23.34KB8.46KB▼ 63.76%
.wordpress-org/banner-772x250.png48.36KB19.59KB▼ 59.50%
.wordpress-org/icon-256x256.png5.81KB3.47KB▼ 40.22%