84% payment-advanced-paypal

Code Review | Payment Advanced - PayPal

WordPress plugin Payment Advanced - PayPal scored84%from 54 tests.

About plugin

  • Plugin page: payment-advanced-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.3
  • WordPress version: 6.3.1
  • First release: Jan 27, 2021
  • Latest release: Jan 27, 2021
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: prestochangeo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /640 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Payment Advanced - PayPal
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.37 ▼5.66
Dashboard /wp-admin3.32 ▲0.0146.18 ▼4.42
Posts /wp-admin/edit.php3.37 ▲0.0149.39 ▲1.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.82 ▼4.42
Media Library /wp-admin/upload.php3.24 ▲0.0135.34 ▼2.44

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 10 new options
New WordPress options
pocoppa_transaction_type
theysaidso_admin_options
pocoppa_visa
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
pocoppa_mc
pocoppa_payment_gateway
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Advanced - PayPal
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.421.69 ▼0.0838.65 ▼10.42
Dashboard /wp-admin2,209 ▲214.88 ▼0.14101.92 ▼15.9639.36 ▼10.98
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0140.01 ▲3.6133.33 ▼2.06
Add New Post /wp-admin/post-new.php1,533 ▼023.18 ▼0.17661.95 ▼41.7955.32 ▲3.72
Media Library /wp-admin/upload.php1,382 ▼34.23 ▲0.0397.10 ▼5.2945.90 ▲2.26

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • pocoppa_mc
    • can_compress_scripts
    • pocoppa_visa
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • pocoppa_transaction_type
    • widget_recent-comments
    • db_upgraded
    • pocoppa_payment_gateway

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/payment-advanced-paypal/class-paypal-advanced.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Logo), #2 (Setting Page), #3 (Payment Page)
Please take inspiration from this readme.txt

payment-advanced-paypal/paypal-advanced.php 92% from 13 tests

This is the main PHP file of "Payment Advanced - PayPal" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payment-advanced-paypal.php" instead of "paypal-advanced.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 detected364 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29616364

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1285.71%
▷ Protected methods17.14%
▷ Private methods17.14%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin