89% sardex-for-woocommerce

Code Review | SardexPay for WooCommerce

WordPress plugin SardexPay for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: sardex-for-woocom...
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.9
  • WordPress version: 6.3.1
  • First release: May 23, 2019
  • Latest release: Feb 23, 2022
  • Number of updates: 16
  • Update frequency: every 63.2 days
  • Top authors: sardexnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,475 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▲4.03ms] Passed 4 tests

Analyzing server-side resources used by SardexPay for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1850.10 ▲12.40
Dashboard /wp-admin3.47 ▲0.1745.68 ▼2.29
Posts /wp-admin/edit.php3.59 ▲0.2348.63 ▲4.93
Add New Post /wp-admin/post-new.php6.05 ▲0.1798.71 ▲8.66
Media Library /wp-admin/upload.php3.40 ▲0.1739.06 ▲4.82

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
_wc_gateway_sardex_merchant_info
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for SardexPay for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.27 ▼1.464.23 ▲2.3338.77 ▼2.42
Dashboard /wp-admin2,246 ▲544.87 ▼0.03109.60 ▼0.0741.36 ▼2.44
Posts /wp-admin/edit.php2,139 ▲502.04 ▲0.0340.79 ▲4.5437.97 ▲1.28
Add New Post /wp-admin/post-new.php1,435 ▼9822.93 ▼0.45493.41 ▼183.5031.67 ▼35.54
Media Library /wp-admin/upload.php1,429 ▲414.19 ▲0.0697.79 ▼10.8539.58 ▼8.70

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: bisoo, sardex, e-commerce, ecommerce, payment gateway...

sardex-for-woocommerce/sardex-for-woocommerce.php 85% from 13 tests

"SardexPay for WooCommerce" version 2.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "3.3")
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)

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
Success! There were no dangerous files found in this plugin2,015 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP124804511,598
CSS1419277
SVG801102
JavaScript282638

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity42.00
▷ Minimum class complexity18.00
▷ Maximum class complexity80.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods53
▷ Static methods3362.26%
▷ Public methods3973.58%
▷ Protected methods00.00%
▷ Private methods1426.42%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.35MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/sardexpay-cashback-logo-big.png15.79KB6.11KB▼ 61.33%
assets/img/sardex-logo-big.png34.59KB10.55KB▼ 69.51%
assets/img/app-cashback.png281.98KB67.62KB▼ 76.02%
assets/img/sardex-email-header.png3.36KB2.73KB▼ 18.60%
assets/img/sardex-bisoo.png8.54KB4.10KB▼ 52.03%