89% paypalpro-woocommerce-addon

Code Review | PayPal Website Payments Pro for WooCommerce

WordPress plugin PayPal Website Payments Pro for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: paypalpro-woocomm...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 5, 2015
  • Latest release: Jul 25, 2016
  • Number of updates: 55
  • Update frequency: every 8.1 days
  • Top authors: nazrulhassanmca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,121 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.37ms] Passed 4 tests

Analyzing server-side resources used by PayPal Website Payments Pro for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.31 ▼5.13
Dashboard /wp-admin3.42 ▲0.1148.83 ▼4.89
Posts /wp-admin/edit.php3.53 ▲0.1747.41 ▼3.47
Add New Post /wp-admin/post-new.php6.00 ▲0.1185.71 ▼11.97
Media Library /wp-admin/upload.php3.34 ▲0.1139.13 ▲4.83

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

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

Browser metrics Passed 4 tests

PayPal Website Payments Pro for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.73 ▲0.322.18 ▲0.2843.15 ▼3.00
Dashboard /wp-admin2,195 ▲215.64 ▼0.0587.48 ▼9.8239.67 ▼18.56
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.1735.41 ▼4.3638.23 ▲0.82
Add New Post /wp-admin/post-new.php1,545 ▲1923.34 ▲5.87613.46 ▼17.9262.36 ▲12.25
Media Library /wp-admin/upload.php1,397 ▼34.20 ▼0.0299.25 ▼4.2840.82 ▼3.59

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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
Good news, no errors were detected

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 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Requires at least: Version not formatted correctly
  • Tested up to: Version not formatted correctly
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

paypalpro-woocommerce-addon/paypalpro-woocommerce-addon.php Passed 13 tests

This is the main PHP file of "PayPal Website Payments Pro for WooCommerce" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
103 characters long description:
This plugin adds a feature in wocommerce for customers to pay with Credit Cards Via Paypal Payment Pro.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin566 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113029566

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity4.71
▷ 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 methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/paypalprocc.png22.47KB7.95KB▼ 64.61%