89% payscript-cryptocheckout

Code Review | Payscript CryptoCheckout

WordPress plugin Payscript CryptoCheckout scored89%from 54 tests.

About plugin

  • Plugin page: payscript-cryptoc...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0
  • WordPress version: 6.3.1
  • First release: Nov 3, 2022
  • Latest release: Nov 3, 2022
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: payscript (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /718 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.33ms] Passed 4 tests

Analyzing server-side resources used by Payscript CryptoCheckout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.1639.74 ▼3.81
Dashboard /wp-admin3.77 ▲0.2149.79 ▼7.23
Posts /wp-admin/edit.php3.83 ▲0.1553.97 ▼2.90
Add New Post /wp-admin/post-new.php6.29 ▲0.1589.54 ▼7.36
Media Library /wp-admin/upload.php3.63 ▲0.1540.88 ▲0.73

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
woocommerce_payscript_version
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Payscript CryptoCheckout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.37 ▼0.152.90 ▲0.9042.64 ▼1.47
Dashboard /wp-admin2,195 ▲215.56 ▼0.0887.36 ▲0.6940.94 ▼1.00
Posts /wp-admin/edit.php2,100 ▼02.18 ▲0.1734.36 ▼2.6433.28 ▼4.47
Add New Post /wp-admin/post-new.php1,554 ▲2818.48 ▲0.70647.05 ▼58.9556.76 ▲4.65
Media Library /wp-admin/upload.php1,400 ▲34.31 ▼0.0196.81 ▼6.8642.31 ▼3.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 | 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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (View Transactions), #2 (View Transaction Details), #3 (Track Payments)
The official readme.txt might help

payscript-cryptocheckout/class-wc-gateway-payscript.php 92% from 13 tests

"Payscript CryptoCheckout" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("payscript-cryptocheckout.php" instead of "class-wc-gateway-payscript.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,416 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS21038846
PHP3124111802
SVG1406507
JavaScript353129
Smarty13089
Markdown127043

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/currency.png2.23KB1.52KB▼ 31.61%
assets/images/timer.png1.75KB0.56KB▼ 67.82%
assets/images/copy.png0.31KB0.31KB0.00%
assets/images/copy1.png4.80KB3.27KB▼ 31.88%