10% plationline

Code Review | PlatiOnline Payments

WordPress plugin PlatiOnline Payments scored10%from 54 tests.

About plugin

  • Plugin page: plationline
  • Plugin version: 6.2.12
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 14, 2018
  • Latest release: Aug 10, 2023
  • Number of updates: 79
  • Update frequency: every 23.9 days
  • Top authors: adrianpo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /10,455 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/plationline/inc/core/class-activator.php+35
    Use of undefined constant WOOCOMMERCE_VERSION - assumed 'WOOCOMMERCE_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.05ms] Passed 4 tests

A check of server-side resources used by PlatiOnline Payments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.18 ▼1.65
Dashboard /wp-admin3.31 ▲0.0045.92 ▲0.81
Posts /wp-admin/edit.php3.36 ▲0.0044.18 ▼4.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.20 ▼24.17
Media Library /wp-admin/upload.php3.23 ▲0.0032.55 ▼1.72

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for PlatiOnline Payments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.28 ▼1.161.91 ▲0.1546.48 ▲5.68
Dashboard /wp-admin2,206 ▲174.87 ▼0.0797.21 ▼14.3137.43 ▼0.32
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0332.11 ▼7.3232.65 ▼4.54
Add New Post /wp-admin/post-new.php1,528 ▲923.34 ▲0.00579.15 ▼25.1745.78 ▼6.63
Media Library /wp-admin/upload.php1,382 ▼34.14 ▼0.1295.95 ▼4.2540.26 ▼3.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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)
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
The following issues need your attention
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PlatiOnlinePO6\\Inc\\Libraries\\sylouuu\\Curl\\Curl' not found in wp-content/plugins/plationline/inc/libraries/sylouuu/curl/method/class-put.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PlatiOnlinePO6\\Inc\\Libraries\\sylouuu\\Curl\\Curl' not found in wp-content/plugins/plationline/inc/libraries/sylouuu/curl/method/class-patch.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/plationline/inc/core/class-wc-plationline-woocommerce-subscriptions.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PlatiOnlinePO6\\Inc\\Libraries\\sylouuu\\Curl\\Curl' not found in wp-content/plugins/plationline/inc/libraries/sylouuu/curl/method/class-options.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PlatiOnlinePO6\\Inc\\Libraries\\sylouuu\\Curl\\Curl' not found in wp-content/plugins/plationline/inc/libraries/sylouuu/curl/method/class-get.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PlatiOnlinePO6\\Inc\\Libraries\\sylouuu\\Curl\\Curl' not found in wp-content/plugins/plationline/inc/libraries/sylouuu/curl/method/class-delete.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Order' not found in wp-content/plugins/plationline/inc/admin/views/html-plationline-admin-display.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/plationline/inc/core/class-wc-plationline.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PlatiOnlinePO6\\Inc\\Libraries\\phpseclib\\Crypt\\Base' not found in wp-content/plugins/plationline/inc/libraries/phpseclib/crypt/class-twofish.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'PlatiOnlinePO6\\Inc\\Libraries\\sylouuu\\Curl\\Curl' not found in wp-content/plugins/plationline/inc/libraries/sylouuu/curl/method/class-head.php:12

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: cart, e-commerce, plationline, ecommerce, shop...

plationline/plationline.php 92% from 13 tests

Analyzing the main PHP file in "PlatiOnline Payments" version 6.2.12
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.0.4")

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
Everything looks great! No dangerous files found in this plugin12,025 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,7555,05410,801
PO File2299497762
JavaScript389330
CSS4218130
JSON2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity51.22
▷ Minimum class complexity1.00
▷ Maximum class complexity401.00
Average method complexity5.24
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes32
▷ Abstract classes26.25%
▷ Concrete classes3093.75%
▷ Final classes00.00%
Methods382
▷ Static methods266.81%
▷ Public methods35592.93%
▷ Protected methods00.00%
▷ Private methods277.07%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants67
▷ Global constants2029.85%
▷ Class constants4770.15%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-wallet.png1.20KB0.67KB▼ 43.90%
assets/images/logo.png1.62KB1.13KB▼ 30.05%