74% white-payments

Code Review | White Payments

WordPress plugin White Payments scored 74% from 54 tests.

About plugin

  • Plugin page: white-payments
  • Plugin version: 2.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2014
  • Latest release: Mar 5, 2015
  • Number of updates: 68
  • Update frequency: every 2.3 days
  • Top authors: yazinsai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.48ms] Passed 4 tests

This is a short check of server-side resources used by White Payments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.16 ▼5.01
Dashboard /wp-admin3.32 ▲0.0144.92 ▼4.46
Posts /wp-admin/edit.php3.43 ▲0.0743.33 ▼3.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.06 ▼9.03
Media Library /wp-admin/upload.php3.24 ▲0.0133.52 ▼0.69

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for White Payments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.16 ▼1.241.70 ▼0.2839.13 ▼7.63
Dashboard /wp-admin2,206 ▲185.85 ▲0.9496.10 ▼24.6037.28 ▼10.97
Posts /wp-admin/edit.php2,086 ▼32.03 ▼0.0232.92 ▼2.2431.77 ▼4.40
Add New Post /wp-admin/post-new.php1,539 ▲523.24 ▲0.08662.73 ▲10.4252.86 ▲1.90
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0695.76 ▼5.9243.63 ▼2.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/white-payments/woocommerce-white.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/white-payments/vendor/white/white/tests/White_ExceptionsTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'White_Error' not found in wp-content/plugins/white-payments/vendor/white/white/src/White/Error/Request.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'White_Error' not found in wp-content/plugins/white-payments/vendor/white/white/src/White/Error/Authentication.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/white-payments/vendor/white/white/tests/White_CustomerTest.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'White_Error' not found in wp-content/plugins/white-payments/vendor/white/white/src/White/Error/Banking.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/white-payments/vendor/white/white/tests/WhiteTest.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/white-payments/vendor/white/white/tests/White_ChargeTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/white-payments/vendor/white/white/tests/White_CardExceptionsTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'White_Error' not found in wp-content/plugins/white-payments/vendor/white/white/src/White/Error/Processing.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 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
8 plugin tags: white, whitepayments, middle east payments, payments, whitepaymentscom...

white-payments/woocommerce-white.php 85% from 13 tests

The principal PHP file in "White Payments" v. 2.0.12 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("white-payments.php" instead of "woocommerce-white.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/white-payments/vendor/white/white/src/data/ca-certificates.crt
1,179 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP221994251,051
Markdown137076
JSON30052

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.25
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods61
▷ Static methods1219.67%
▷ Public methods6098.36%
▷ Protected methods00.00%
▷ Private methods11.64%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
white-power.png3.81KB2.07KB▼ 45.76%
white-cards.png2.64KB1.63KB▼ 38.11%