78% woo-paypal-advanced

Code Review | PayPal Advanced for Woo

WordPress plugin PayPal Advanced for Woo scored 78% from 54 tests.

About plugin

  • Plugin page: woo-paypal-advanced
  • 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

3 reviews

Install metrics

80+ active / 4,404 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.91ms] Passed 4 tests

An overview of server-side resources used by PayPal Advanced for Woo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.94 ▲1.04
Dashboard /wp-admin3.38 ▲0.0850.99 ▲6.19
Posts /wp-admin/edit.php3.49 ▲0.1448.13 ▼2.84
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.15 ▼19.75
Media Library /wp-admin/upload.php3.30 ▲0.0736.02 ▲1.92

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

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

Browser metrics Passed 4 tests

PayPal Advanced for Woo: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8613.46 ▼0.751.69 ▼0.0145.77 ▲2.15
Dashboard /wp-admin2,230 ▲425.19 ▼0.70103.46 ▼8.8438.13 ▼7.61
Posts /wp-admin/edit.php2,094 ▲22.30 ▲0.3041.34 ▼1.8938.10 ▲3.46
Add New Post /wp-admin/post-new.php1,693 ▲17422.27 ▼0.92643.29 ▼53.5237.76 ▼20.24
Media Library /wp-admin/upload.php1,413 ▲254.39 ▲0.1194.67 ▼10.1742.59 ▼3.87

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-paypal-advanced/admin/partials/pal-advanced-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-paypal-advanced/includes/class-premium-pal-advanced-gateway.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
9 plugin tags: paypal, ecommerce, e-commerce, woocommerce, gateway...

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

The main file in "PayPal Advanced for Woo" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-paypal-advanced.php" instead of "pal-advanced.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected883 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12185403881
JavaScript1012
CSS1040

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.86
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods45
▷ Static methods24.44%
▷ Public methods4088.89%
▷ Protected methods00.00%
▷ Private methods511.11%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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%