89% enable-standard-paypal-for-woocommerce

Code Review | Enable Standard PayPal for WooCommerce

WordPress plugin Enable Standard PayPal for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: enable-standard-p...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-5.8
  • WordPress version: 6.3.1
  • First release: Sep 7, 2021
  • Latest release: Sep 7, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: vikcheema (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

8,000+ active /10,975 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Enable Standard PayPal for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.50 ▲2.58
Dashboard /wp-admin3.31 ▼0.0453.05 ▼11.36
Posts /wp-admin/edit.php3.36 ▲0.0049.42 ▲2.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.83 ▼6.69
Media Library /wp-admin/upload.php4.35 ▲1.1275.25 ▲40.30

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Enable Standard PayPal for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.65 ▼0.641.93 ▲0.1240.36 ▼5.36
Dashboard /wp-admin2,206 ▲185.85 ▲0.84108.80 ▼9.2840.74 ▼5.75
Posts /wp-admin/edit.php2,092 ▲31.99 ▲0.0243.52 ▲8.5535.15 ▲0.17
Add New Post /wp-admin/post-new.php1,519 ▲523.28 ▲5.69678.86 ▲12.3458.02 ▲9.75
Media Library /wp-admin/upload.php1,388 ▼34.24 ▼0.0196.49 ▼4.8742.04 ▼5.34

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Go to Woocommerce -> Settings -> Payments) image missing
Please take inspiration from this readme.txt

enable-standard-paypal-for-woocommerce/enable-standard-paypal-for-woocommerce.php 92% from 13 tests

The entry point to "Enable Standard PayPal for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin42 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
Markdown110025
PHP283317

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin