90% dagpay-for-woocommerce

Code Review | Dagpay for WooCommerce

WordPress plugin Dagpay for WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: dagpay-for-woocom...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.0
  • WordPress version: 6.3.1
  • First release: Jun 21, 2018
  • Latest release: Feb 3, 2022
  • Number of updates: 24
  • Update frequency: every 55.4 days
  • Top authors: dagcoin975 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 796 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.81ms] Passed 4 tests

This is a short check of server-side resources used by Dagpay for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1040.94 ▼8.58
Dashboard /wp-admin3.40 ▲0.1049.46 ▼0.52
Posts /wp-admin/edit.php3.51 ▲0.1645.70 ▼1.10
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.43 ▲0.80
Media Library /wp-admin/upload.php3.32 ▲0.0934.69 ▼1.02

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Dagpay for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.63 ▼0.794.52 ▲2.5243.40 ▼1.21
Dashboard /wp-admin2,203 ▲155.79 ▲0.88100.02 ▼16.1638.86 ▼10.20
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0234.27 ▼0.9929.80 ▼5.56
Add New Post /wp-admin/post-new.php1,539 ▲2523.11 ▲5.47630.93 ▲21.7450.05 ▲6.13
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0296.78 ▼4.8239.59 ▼4.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: payments, dagpay, merchants, merchant, cryptocurrency...

dagpay-for-woocommerce/dagcoin.php 92% from 13 tests

This is the main PHP file of "Dagpay for WooCommerce" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dagpay-for-woocommerce.php" instead of "dagcoin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,658 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP12216321956
Markdown31350610
JSON30071
SVG10121

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods67
▷ Static methods34.48%
▷ Public methods5379.10%
▷ Protected methods00.00%
▷ Private methods1420.90%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin