84% sparkle-2co-digital-payment-lite

Code Review | Sparkle 2CO Digital Payment Lite

WordPress plugin Sparkle 2CO Digital Payment Lite scored84%from 54 tests.

About plugin

  • Plugin page: sparkle-2co-digit...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2021
  • Latest release: Apr 2, 2023
  • Number of updates: 15
  • Update frequency: every 36.5 days
  • Top authors: sparklewpthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /739 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.02MB] [CPU: ▼1.59ms] Passed 4 tests

Server-side resources used by Sparkle 2CO Digital Payment Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.68 ▲1.12
Dashboard /wp-admin3.32 ▲0.0253.93 ▼0.54
Posts /wp-admin/edit.php3.37 ▲0.0253.40 ▲1.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0296.00 ▼6.30
Media Library /wp-admin/upload.php3.25 ▲0.0240.81 ▼0.63

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Sparkle 2CO Digital Payment Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▼0.371.70 ▼0.4540.79 ▼4.41
Dashboard /wp-admin2,201 ▲305.59 ▼0.0887.26 ▼3.1442.13 ▲2.07
Posts /wp-admin/edit.php2,107 ▲41.98 ▼0.0240.03 ▲2.2636.39 ▼3.17
Add New Post /wp-admin/post-new.php1,537 ▲923.15 ▲0.13656.49 ▼40.5654.43 ▲5.28
Media Library /wp-admin/upload.php1,403 ▲94.18 ▼0.0497.70 ▲1.9443.57 ▼1.89

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sparkle-2co-digital-payment-lite/sparkle-2co-digital-payment-lite.php
    • > /wp-content/plugins/sparkle-2co-digital-payment-lite/includes/class_sparkle_2checkout_dp_api.php
    • > /wp-content/plugins/sparkle-2co-digital-payment-lite/includes/class_sparkle_2co_dp_library.php
    • > /wp-content/plugins/sparkle-2co-digital-payment-lite/includes/class_sparkle_woo_2co_standard_gateway.php
    • > /wp-content/plugins/sparkle-2co-digital-payment-lite/includes/edd_plugin_init.php
    • > /wp-content/plugins/sparkle-2co-digital-payment-lite/includes/woo_plugin_init.php

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 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
9 plugin tags: woo gateway, edd payment, payment, 2checkout payment, edd gateway...

sparkle-2co-digital-payment-lite/sparkle-2co-digital-payment-lite.php 85% from 13 tests

The main PHP script in "Sparkle 2CO Digital Payment Lite" version 1.0.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

Code Analysis Passed 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
No dangerous file extensions were detected1,380 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP63333181,380

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity35.67
▷ Minimum class complexity8.00
▷ Maximum class complexity103.00
Average method complexity5.52
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods48
▷ Static methods1020.83%
▷ Public methods4083.33%
▷ Protected methods00.00%
▷ Private methods816.67%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon2.png8.48KB3.65KB▼ 56.98%
assets/images/icon1.png1.53KB0.90KB▼ 41.57%
assets/images/icon3.png4.81KB2.37KB▼ 50.68%