84% woo-paypal-payflow

Code Review | PayPal Pro Payflow for Woo

WordPress plugin PayPal Pro Payflow for Woo scored 84% from 54 tests.

About plugin

  • Plugin page: woo-paypal-payflow
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Jul 21, 2016
  • Latest release: Aug 17, 2016
  • Number of updates: 7
  • Update frequency: every 3.9 days
  • Top authors: wpremiumdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by PayPal Pro Payflow for Woo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.23 ▼9.04
Dashboard /wp-admin3.31 ▲0.0144.67 ▼4.80
Posts /wp-admin/edit.php3.36 ▲0.0146.07 ▼3.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.10 ▼8.44
Media Library /wp-admin/upload.php3.24 ▲0.0134.71 ▼1.62

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PayPal Pro Payflow for Woo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.61 ▲0.331.69 ▼4.2338.04 ▼5.20
Dashboard /wp-admin2,206 ▲274.85 ▼1.00110.62 ▼4.7844.55 ▲0.91
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0132.58 ▼2.4931.73 ▼3.34
Add New Post /wp-admin/post-new.php1,533 ▼223.35 ▲0.20721.69 ▲42.0151.61 ▼6.78
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0294.51 ▼6.5840.31 ▼3.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 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/woo-paypal-payflow/includes/class-premium-pal-pro-payflow-gateway.php:17

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: ecommerce, payflow, e-commerce, gateway, pro...

woo-paypal-payflow/pal-pro-payflow.php 92% from 13 tests

The main PHP script in "PayPal Pro Payflow for Woo" version 1.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-paypal-payflow.php" instead of "pal-pro-payflow.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected724 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10101293724

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3489.47%
▷ Protected methods00.00%
▷ Private methods410.53%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/cards.png8.09KB3.33KB▼ 58.77%