89% woo-sonypayment

Code Review | Sony Payment Services pro for WooCommerce

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

About plugin

  • Plugin page: woo-sonypayment
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2018
  • Latest release: May 31, 2023
  • Number of updates: 58
  • Update frequency: every 29.3 days
  • Top authors: uscnanbu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.50MB] [CPU: ▼0.70ms] Passed 4 tests

An overview of server-side resources used by Sony Payment Services pro for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.49 ▲1.42
Dashboard /wp-admin4.14 ▲0.8447.53 ▼4.43
Posts /wp-admin/edit.php4.14 ▲0.7848.37 ▼1.85
Add New Post /wp-admin/post-new.php6.24 ▲0.3593.42 ▲3.83
Media Library /wp-admin/upload.php4.14 ▲0.9136.19 ▲2.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Sony Payment Services pro for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.46 ▼0.911.97 ▲0.2146.40 ▲1.86
Dashboard /wp-admin2,218 ▲295.10 ▼0.80101.89 ▼20.8239.30 ▼8.27
Posts /wp-admin/edit.php2,106 ▲172.32 ▲0.3141.42 ▲1.5135.20 ▼1.22
Add New Post /wp-admin/post-new.php1,526 ▲423.16 ▼0.06585.38 ▼100.2733.20 ▼34.27
Media Library /wp-admin/upload.php1,394 ▲34.58 ▲0.3597.31 ▲1.5739.95 ▼6.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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
Attributes that require attention:
  • Requires php: Invalid version format
The official readme.txt is a good inspiration

woo-sonypayment/woo-sonypayment.php 92% from 13 tests

"Sony Payment Services pro for WooCommerce" version 1.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("7.7" instead of "3.0")

Code Analysis 97% from 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,852 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP195831,2536,171
PO File1467205947
JavaScript71031584
CSS122150

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 211)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity77.31
▷ Minimum class complexity1.00
▷ Maximum class complexity394.00
Average method complexity9.19
▷ Minimum method complexity1.00
▷ Maximum method complexity211.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods149
▷ Static methods2315.44%
▷ Public methods14295.30%
▷ Protected methods21.34%
▷ Private methods53.36%
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
PNG images were not found in this plugin