84% dogecash-payment-gateway-for-woocommerce

Code Review | DogeCash Gateway for WooCommerce

WordPress plugin DogeCash Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: dogecash-payment-...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 30, 2021
  • Latest release: Aug 31, 2021
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: weoka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /297 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼15.97ms] Passed 4 tests

Analyzing server-side resources used by DogeCash Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0323.97 ▼13.20
Dashboard /wp-admin3.24 ▼0.0628.82 ▼20.45
Posts /wp-admin/edit.php3.31 ▼0.0436.97 ▼7.73
Add New Post /wp-admin/post-new.php5.48 ▼0.4075.59 ▼22.48
Media Library /wp-admin/upload.php3.25 ▲0.0224.85 ▼7.37

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

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

Browser metrics Passed 4 tests

Checking browser requirements for DogeCash Gateway for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,103 ▼1,64312.38 ▼2.000.49 ▼1.2015.64 ▼22.68
Dashboard /wp-admin831 ▼1,3581.38 ▼3.5312.82 ▼96.4421.66 ▼21.31
Posts /wp-admin/edit.php842 ▼1,2501.14 ▼0.837.78 ▼30.1921.96 ▼9.33
Add New Post /wp-admin/post-new.php568 ▼9461.73 ▼15.8023.61 ▼676.720.20 ▼62.81
Media Library /wp-admin/upload.php727 ▼6641.73 ▼2.4919.51 ▼86.6119.94 ▼24.94

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/dogecash-payment-gateway-for-woocommerce/woocommerce-dogecash.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

dogecash-payment-gateway-for-woocommerce/woocommerce-dogecash.php 92% from 13 tests

Analyzing the main PHP file in "DogeCash Gateway for WooCommerce" version 1.0.7
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dogecash-payment-gateway-for-woocommerce.php" instead of "woocommerce-dogecash.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin849 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP315366552
CSS131180
JavaScript1211282
SVG26222
Markdown112013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/plugin-logo.png3.89KB2.38KB▼ 38.81%