10% platron-payment-gate-for-thecartpress

Code Review | Platron for TheCartPress

WordPress plugin Platron for TheCartPress scored10%from 54 tests.

About plugin

  • Plugin page: platron-payment-g...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Nov 18, 2014
  • Latest release: Aug 28, 2019
  • Number of updates: 22
  • Update frequency: every 79.3 days
  • Top authors: Lexus1990 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /750 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/platron-payment-gate-for-thecartpress/classes/PG_Signature.php+14
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼61.22ms] Passed 4 tests

This is a short check of server-side resources used by Platron for TheCartPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.317.10 ▼37.45
Dashboard /wp-admin2.18 ▼1.176.44 ▼62.06
Posts /wp-admin/edit.php2.18 ▼1.187.27 ▼41.39
Add New Post /wp-admin/post-new.php2.18 ▼3.716.08 ▼103.99
Media Library /wp-admin/upload.php2.18 ▼1.057.15 ▼36.45

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
recovery_mode_email_last_sent
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Platron for TheCartPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,459 ▼1,32712.80 ▼1.572.17 ▲0.3137.62 ▼4.44
Dashboard /wp-admin852 ▼1,3221.38 ▼4.2814.25 ▼76.2320.75 ▼21.82
Posts /wp-admin/edit.php863 ▼1,2371.53 ▼0.656.15 ▼34.8015.68 ▼21.80
Add New Post /wp-admin/post-new.php589 ▼9371.73 ▼15.8518.28 ▼700.190.18 ▼59.65
Media Library /wp-admin/upload.php748 ▼6521.73 ▼2.3919.51 ▼97.5219.22 ▼29.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/platron-payment-gate-for-thecartpress/classes/PG_Signature.php+14
    Array and string offset access syntax with curly braces is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: payment gate, payment system, payment gateway, thecartpress, payment

platron-payment-gate-for-thecartpress/platron.php 92% from 13 tests

This is the main PHP file of "Platron for TheCartPress" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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-for-thecartpress.php" instead of "platron.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected380 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP377105380

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.75
▷ Minimum class complexity3.00
▷ Maximum class complexity39.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1963.33%
▷ Public methods2790.00%
▷ Protected methods00.00%
▷ Private methods310.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
5 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-1.png68.58KB32.07KB▼ 53.24%
assets/banner-772x250.png139.39KB64.71KB▼ 53.57%
assets/screenshot-3.png46.97KB15.59KB▼ 66.81%
assets/icon-128x128.png5.89KB2.13KB▼ 63.85%
assets/screenshot-2.png54.13KB25.82KB▼ 52.30%