89% wc-sodexo

Code Review | Payment Integration of Sodexo for WooCommerce

WordPress plugin Payment Integration of Sodexo for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: wc-sodexo
  • Plugin version: 2.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-6.3
  • WordPress version: 6.3.1
  • First release: May 10, 2021
  • Latest release: Sep 23, 2023
  • Number of updates: 26
  • Update frequency: every 33.3 days
  • Top authors: jain640 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 662 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.09MB] [CPU: ▼2.73ms] Passed 4 tests

A check of server-side resources used by Payment Integration of Sodexo for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0942.75 ▼2.91
Dashboard /wp-admin3.40 ▲0.1048.60 ▼4.75
Posts /wp-admin/edit.php3.51 ▲0.1644.34 ▼1.40
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.45 ▼1.36
Media Library /wp-admin/upload.php3.32 ▲0.0935.22 ▼1.87

Server storage [IO: ▲1.92MB] [DB: ▲0.01MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Payment Integration of Sodexo for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.74 ▲0.101.90 ▲0.0243.48 ▲0.53
Dashboard /wp-admin2,203 ▲155.85 ▼0.02102.92 ▲3.1139.01 ▼5.75
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0433.73 ▲0.7334.78 ▲1.53
Add New Post /wp-admin/post-new.php1,542 ▲2522.79 ▲5.04619.43 ▼28.2857.09 ▲4.97
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.0298.75 ▲4.6343.71 ▲1.04

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

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

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #4 (sodexo-zeta page where customer need to fill all details.) image missing
Please take inspiration from this readme.txt

wc-sodexo/woo-sodexo.php 92% from 13 tests

This is the main PHP file of "Payment Integration of Sodexo for WooCommerce" version 2.4.1, 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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-sodexo.php" instead of "woo-sodexo.php")

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
Good job! No executable or dangerous file extensions detected523 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1126168523

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods1854.55%
▷ Protected methods1236.36%
▷ Private methods39.09%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 1.75MB with 1.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sodexo.png14.58KB4.63KB▼ 68.27%
images/Payment_screen.PNG50.73KB25.31KB▼ 50.11%
images/Payment_screen.v1.png226.39KB74.66KB▼ 67.02%
images/Sodexo_payment.PNG105.31KB31.05KB▼ 70.51%
images/logo.v1 (1).v1.png510.71KB241.04KB▼ 52.80%