84% paidy-wc

Code Review | Paidy for WooCommerce

WordPress plugin Paidy for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: paidy-wc
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Aug 3, 2023
  • Number of updates: 47
  • Update frequency: every 30.5 days
  • Top authors: shohei.tanaka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,783 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Paidy for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.95 ▼9.76
Dashboard /wp-admin3.32 ▲0.0249.47 ▼4.84
Posts /wp-admin/edit.php3.37 ▲0.0153.12 ▼0.31
Add New Post /wp-admin/post-new.php5.90 ▲0.01106.79 ▲4.25
Media Library /wp-admin/upload.php3.24 ▲0.0139.11 ▲0.50

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paidy for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.23 ▼0.131.64 ▼0.1740.94 ▼4.74
Dashboard /wp-admin2,206 ▲295.61 ▲0.0491.59 ▲1.5444.66 ▲1.25
Posts /wp-admin/edit.php2,115 ▲151.97 ▼0.0252.20 ▲11.7535.41 ▲2.20
Add New Post /wp-admin/post-new.php1,535 ▲723.07 ▼0.32652.06 ▲1.0355.62 ▲5.97
Media Library /wp-admin/upload.php1,414 ▲204.24 ▲0.08100.40 ▲2.5347.67 ▲3.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paidy-wc/includes/gateways/paidy/class-wc-paidy-endpoint.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: japanese, woocommerce, paidy, payment, e-commerce...

paidy-wc/paidy-wc.php Passed 13 tests

"Paidy for WooCommerce" version 1.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
21 characters long description:
Paidy for WooCommerce

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
Good job! No executable or dangerous file extensions detected1,489 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP71526181,407
JavaScript118771
CSS10111

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity45.75
▷ Minimum class complexity3.00
▷ Maximum class complexity76.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods70
▷ Static methods11.43%
▷ Public methods6592.86%
▷ Protected methods00.00%
▷ Private methods57.14%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/woo-logo.png19.97KB7.37KB▼ 63.08%
assets/images/paidy_logo_100_2023.png4.02KB2.07KB▼ 48.56%
assets/images/paidy_checkout_2023_320x100.png18.34KB7.69KB▼ 58.05%
assets/images/checkout_banner_320x100.png25.86KB9.74KB▼ 62.33%