89% pp-express-wc4jp

Code Review | PayPal Checkout Payment for WooCommerce in Japan

WordPress plugin PayPal Checkout Payment for WooCommerce in Japan scored89%from 54 tests.

About plugin

  • Plugin page: pp-express-wc4jp
  • Plugin version: 2.0.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.4
  • WordPress version: 6.3.1
  • First release: Jul 27, 2015
  • Latest release: Aug 23, 2020
  • Number of updates: 61
  • Update frequency: every 30.4 days
  • Top authors: Artisan-Workshop (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /29,537 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.36ms] Passed 4 tests

Analyzing server-side resources used by PayPal Checkout Payment for WooCommerce in Japan
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.07 ▼1.34
Dashboard /wp-admin3.38 ▲0.0450.84 ▼9.80
Posts /wp-admin/edit.php3.50 ▲0.1452.05 ▲2.72
Add New Post /wp-admin/post-new.php5.97 ▲0.0899.16 ▼6.60
Media Library /wp-admin/upload.php3.31 ▲0.0839.51 ▲0.32

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

PayPal Checkout Payment for WooCommerce in Japan: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.35 ▲0.001.66 ▼0.2248.44 ▲6.30
Dashboard /wp-admin2,218 ▲445.57 ▼0.0783.43 ▼11.6043.91 ▲1.89
Posts /wp-admin/edit.php2,124 ▲271.99 ▼0.0539.30 ▲0.3435.75 ▼7.89
Add New Post /wp-admin/post-new.php1,552 ▲2418.15 ▼5.05607.78 ▼59.1657.82 ▼1.68
Media Library /wp-admin/upload.php1,414 ▲114.21 ▲0.0598.26 ▼17.4243.05 ▼4.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Click the "Setup or link an existing PayPal account" button. If you want to test before going live, you can switch the Environment, above the button, to Sandbox.), #2 (API credentials will be set after linking, or you can set them manually.), #3 (See PayPal button settings below.), #4 (Checkout with PayPal directly from the Cart.), #5 (And without leaving the store.), #6 (Confirm details after clicking "Continue".), #7 (Choose PayPal from regular checkout page.), #8 (Choose PayPal from single product page.), #9 (Initiate checkout from mini-cart.)
The official readme.txt might help

pp-express-wc4jp/pp-express-wc4jp.php 85% from 13 tests

This is the main PHP file of "PayPal Checkout Payment for WooCommerce in Japan" version 2.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "2.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected7,335 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,2882,3186,633
JavaScript713475637
CSS14765

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.54
▷ Minimum class complexity1.00
▷ Maximum class complexity169.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes36.52%
▷ Concrete classes4393.48%
▷ Final classes00.00%
Methods312
▷ Static methods30.96%
▷ Public methods25080.13%
▷ Protected methods5718.27%
▷ Private methods51.60%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants89
▷ Global constants33.37%
▷ Class constants8696.63%
▷ Public constants86100.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.19MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/in-context-composite.png194.81KB85.32KB▼ 56.20%