89% sonypayment-light-for-woocommerce

Code Review | Sony Payment Services light for WooCommerce

WordPress plugin Sony Payment Services light for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: sonypayment-light...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2020
  • Latest release: May 31, 2023
  • Number of updates: 37
  • Update frequency: every 30.1 days
  • Top authors: sonypaymentservices (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,470 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.06ms] Passed 4 tests

Server-side resources used by Sony Payment Services light for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.26 ▼1.67
Dashboard /wp-admin3.37 ▲0.0755.42 ▲3.24
Posts /wp-admin/edit.php3.49 ▲0.1347.17 ▼4.56
Add New Post /wp-admin/post-new.php5.96 ▲0.0796.46 ▼5.26
Media Library /wp-admin/upload.php3.30 ▲0.0739.74 ▲4.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Sony Payment Services light for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.021.92 ▼0.4343.63 ▼0.48
Dashboard /wp-admin2,198 ▲245.63 ▲0.0787.39 ▼12.0240.73 ▼4.16
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0834.99 ▼1.4037.27 ▼0.37
Add New Post /wp-admin/post-new.php1,528 ▲223.22 ▼0.32681.61 ▲17.0463.61 ▲9.26
Media Library /wp-admin/upload.php1,403 ▲64.19 ▲0.01100.01 ▼11.7345.06 ▼0.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Requires php: Invalid plugin version format
The official readme.txt might help

sonypayment-light-for-woocommerce/woo-sonypayment-light.php 85% from 13 tests

"Sony Payment Services light for WooCommerce" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("7.7" instead of "3.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sonypayment-light-for-woocommerce.php" instead of "woo-sonypayment-light.php")

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected5,637 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP184411,0764,081
PO File1462205937
JavaScript6881487
CSS111132

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity60.47
▷ Minimum class complexity1.00
▷ Maximum class complexity394.00
Average method complexity7.71
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods133
▷ Static methods2317.29%
▷ Public methods12996.99%
▷ Protected methods10.75%
▷ Private methods32.26%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants520.83%
▷ Class constants1979.17%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin