84% wcmp-cointopay-gateway

Code Review | WCMP Cointopay Gateway

WordPress plugin WCMP Cointopay Gateway scored84%from 54 tests.

About plugin

  • Plugin page: wcmp-cointopay-ga...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.0.0
  • WordPress version: 6.3.1
  • First release: Nov 15, 2019
  • Latest release: May 23, 2022
  • Number of updates: 17
  • Update frequency: every 54.3 days
  • Top authors: cointopay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /741 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.04ms] Passed 4 tests

This is a short check of server-side resources used by WCMP Cointopay Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.79 ▼2.10
Dashboard /wp-admin3.34 ▼0.0142.60 ▼18.82
Posts /wp-admin/edit.php3.39 ▲0.0345.83 ▲3.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.95 ▼8.67
Media Library /wp-admin/upload.php3.26 ▲0.0333.71 ▲1.43

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WCMP Cointopay Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.51 ▲0.152.09 ▲0.2744.94 ▲1.37
Dashboard /wp-admin2,205 ▲285.56 ▼0.1181.04 ▼18.4339.30 ▼1.71
Posts /wp-admin/edit.php2,114 ▲112.00 ▼0.0236.39 ▼1.5232.89 ▼1.25
Add New Post /wp-admin/post-new.php1,539 ▲523.42 ▲5.29667.62 ▲47.0954.07 ▼11.66
Media Library /wp-admin/upload.php1,410 ▲134.25 ▲0.02105.16 ▲2.6747.02 ▲5.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wcmp-cointopay-gateway/classes/class-wcmp-cointopay-gateway-payment-method.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: vendor, cointopay gateway, wc marketplace, crypto, commission...

wcmp-cointopay-gateway/wcmp-cointopay-gateway.php Passed 13 tests

"WCMP Cointopay Gateway" version 1.2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
115 characters long description:
WCMP Cointopay Gateway is a payment gateway for woocommerce shopping plateform also compatible with WC Marketplace.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin862 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP710482632
PO File15760166
JavaScript15839
Markdown120025

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.80
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods2392.00%
▷ Protected methods28.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fail.png2.15KB1.72KB▼ 19.99%
assets/images/cointopay.png6.90KB2.94KB▼ 57.45%
assets/images/check.png2.47KB2.29KB▼ 7.17%