84% nettle-pay

Code Review | Nettle Pay for WooCommerce

WordPress plugin Nettle Pay for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: nettle-pay
  • Plugin version: 2.5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2022
  • Latest release: Mar 24, 2023
  • Number of updates: 9
  • Update frequency: every 21.0 days
  • Top authors: nettlelabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /770 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.00MB] [CPU: ▼6.81ms] Passed 4 tests

Analyzing server-side resources used by Nettle Pay for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.34 ▲0.13
Dashboard /wp-admin3.31 ▲0.0046.76 ▼9.20
Posts /wp-admin/edit.php3.36 ▲0.0047.26 ▼7.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.94 ▼9.43
Media Library /wp-admin/upload.php3.23 ▲0.0035.42 ▼1.22

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Nettle Pay for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.201.68 ▲0.1041.30 ▼0.80
Dashboard /wp-admin2,195 ▲155.62 ▲0.0486.53 ▼11.1542.03 ▲3.83
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0734.85 ▼9.9332.65 ▼8.78
Add New Post /wp-admin/post-new.php1,526 ▼1123.09 ▲4.80670.68 ▲25.6654.42 ▼11.62
Media Library /wp-admin/upload.php1,400 ▲34.20 ▲0.02106.53 ▼2.4645.21 ▲1.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nettle-pay/nettle-pay.php:21

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This is the Nettle Pay settings screen. Simply add your API key ID and API secret to start using Nettle Pay on your WooCommerce checkout), #2 (This is Nettle Pay as it appears on your WOoCommerce checkout. A customer will be redirected to the secure Nettle Pay payment gateway.)
Please take inspiration from this readme.txt

nettle-pay/nettle-pay.php Passed 13 tests

The main file in "Nettle Pay for WooCommerce" v. 2.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
121 characters long description:
Nettle makes it easy to take crypto payments globally, reward customers and reduce your CO2e emissions, all in one place.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin314 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP485135314

PHP code Passed 2 tests

An short overview of 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.29
Average class complexity17.00
▷ Minimum class complexity5.00
▷ Maximum class complexity29.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods430.77%
▷ Public methods1076.92%
▷ Protected methods17.69%
▷ Private methods215.38%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.55MB with 0.40MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png296.34KB100.76KB▼ 66.00%
assets/screenshot-2.png258.79KB93.24KB▼ 63.97%
assets/images/nettle_icon-64x64.png9.72KB0.97KB▼ 90.04%