84% switchere-com-crypto-gateway

Code Review | Switchere.com Crypto Gateway

WordPress plugin Switchere.com Crypto Gateway scored84%from 54 tests.

About plugin

  • Plugin page: switchere-com-cry...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Apr 28, 2023
  • Latest release: May 22, 2023
  • Number of updates: 4
  • Update frequency: every 6.3 days
  • Top authors: switcherewp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /123 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 gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.29ms] Passed 4 tests

Analyzing server-side resources used by Switchere.com Crypto Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.62 ▼2.59
Dashboard /wp-admin3.31 ▼0.0341.99 ▼14.46
Posts /wp-admin/edit.php3.36 ▲0.0144.14 ▼5.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.46 ▼22.30
Media Library /wp-admin/upload.php3.23 ▲0.0133.57 ▼0.21

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Switchere.com Crypto Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.21 ▼1.211.58 ▼0.0938.12 ▲0.29
Dashboard /wp-admin2,214 ▲265.86 ▼0.0296.00 ▼6.9838.44 ▼8.17
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0140.11 ▼2.2535.49 ▼1.80
Add New Post /wp-admin/post-new.php1,550 ▲3623.32 ▲5.74577.83 ▼34.4649.79 ▼6.95
Media Library /wp-admin/upload.php1,399 ▲84.22 ▲0.0394.81 ▼3.0344.57 ▲0.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/switchere-com-crypto-gateway/includes/class-wc-gateway-switchere.php:8

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

switchere-com-crypto-gateway/woocommerce-switchere-gateway.php 92% from 13 tests

The entry point to "Switchere.com Crypto Gateway" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("switchere-com-crypto-gateway.php" instead of "woocommerce-switchere-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected474 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP496124391
CSS117577
SVG1006

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity18.00
▷ Minimum class complexity5.00
▷ Maximum class complexity31.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods19
▷ Static methods210.53%
▷ Public methods1368.42%
▷ Protected methods00.00%
▷ Private methods631.58%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.26MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/illustration.png260.82KB284.44KB0.00%
assets/images/icon.png6.52KB3.24KB▼ 50.28%