10% platron-payment-gate-woocommerce

Code Review | Platron for WooCommerce

WordPress plugin Platron for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: platron-payment-g...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jun 13, 2014
  • Latest release: Aug 28, 2019
  • Number of updates: 47
  • Update frequency: every 40.6 days
  • Top authors: Lexus1990 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,353 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/platron-payment-gate-woocommerce/PG_Signature.php+14
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.79MB] [CPU: ▼54.24ms] Passed 4 tests

Server-side resources used by Platron for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.276.26 ▼35.51
Dashboard /wp-admin2.21 ▼1.096.63 ▼39.42
Posts /wp-admin/edit.php2.21 ▼1.146.78 ▼43.10
Add New Post /wp-admin/post-new.php2.21 ▼3.676.45 ▼98.93
Media Library /wp-admin/upload.php2.21 ▼1.025.11 ▼33.65

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Platron for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.15 ▼1.141.57 ▼0.2039.31 ▼17.02
Dashboard /wp-admin2,203 ▲324.86 ▼1.04111.83 ▲10.4640.55 ▼5.62
Posts /wp-admin/edit.php2,092 ▼02.01 ▼0.1639.38 ▲3.5735.42 ▲2.27
Add New Post /wp-admin/post-new.php1,533 ▼323.11 ▼0.07610.16 ▼31.3366.85 ▲14.91
Media Library /wp-admin/upload.php1,385 ▼34.31 ▲0.0893.85 ▼1.0940.50 ▼0.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/platron-payment-gate-woocommerce/PG_Signature.php+14
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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 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
Everything seems fine, however this is by no means an exhaustive test

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: woocommerce, payment gateway, payment, payment gate, payment system...

platron-payment-gate-woocommerce/wc-platron.php 92% from 13 tests

"Platron for WooCommerce" version 2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("platron-payment-gate-woocommerce.php" instead of "wc-platron.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin503 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3100114503

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods1139.29%
▷ Public methods2175.00%
▷ Protected methods00.00%
▷ Private methods725.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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.31MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png46.97KB15.59KB▼ 66.81%
assets/banner-772x250.png139.39KB64.71KB▼ 53.57%
assets/screenshot-1.png68.58KB32.07KB▼ 53.24%
assets/screenshot-2.png54.13KB25.82KB▼ 52.30%
assets/icon-128x128.png5.89KB2.13KB▼ 63.85%