84% cointopay-gateway-for-easy-digital-downloads

Code Review | Cointopay Gateway for Easy Digital Downloads

WordPress plugin Cointopay Gateway for Easy Digital Downloads scored84%from 54 tests.

About plugin

  • Plugin page: cointopay-gateway...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2019
  • Latest release: Jan 5, 2023
  • Number of updates: 12
  • Update frequency: every 94.6 days
  • Top authors: cointopay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /966 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.85ms] Passed 4 tests

A check of server-side resources used by Cointopay Gateway for Easy Digital Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.93 ▲4.49
Dashboard /wp-admin3.31 ▼0.0443.35 ▼10.11
Posts /wp-admin/edit.php3.36 ▲0.0046.58 ▼0.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.24 ▼9.74
Media Library /wp-admin/upload.php3.23 ▲0.0030.48 ▼7.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Cointopay Gateway for Easy Digital Downloads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.18 ▼1.492.26 ▲0.2642.42 ▼4.84
Dashboard /wp-admin2,203 ▲155.76 ▲0.80104.05 ▼1.0839.14 ▼0.24
Posts /wp-admin/edit.php2,092 ▲62.05 ▼0.0137.13 ▲1.4734.32 ▲1.89
Add New Post /wp-admin/post-new.php1,533 ▲1423.22 ▲0.05639.24 ▼29.2755.89 ▲4.79
Media Library /wp-admin/upload.php1,391 ▲34.28 ▲0.0495.95 ▲1.4341.80 ▼1.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'cointopay\\Merchant' not found in wp-content/plugins/cointopay-gateway-for-easy-digital-downloads/includes/cointopay/lib/Merchant/Order.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cointopay-gateway-for-easy-digital-downloads/templates/payment-completed.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cointopay-gateway-for-easy-digital-downloads/templates/payment-failed.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
No tags were detected

cointopay-gateway-for-easy-digital-downloads/easy-digital-downloads-cointopay-gateway.php 92% from 13 tests

The primary PHP file in "Cointopay Gateway for Easy Digital Downloads" version 1.7 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cointopay-gateway-for-easy-digital-downloads.php" instead of "easy-digital-downloads-cointopay-gateway.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
Everything looks great! No dangerous files found in this plugin635 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8133379613
Markdown110022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.50
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods29
▷ Static methods620.69%
▷ Public methods2275.86%
▷ Protected methods00.00%
▷ Private methods724.14%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin