84% tn-gateway-for-woocommerce

Code Review | TurtleNetwork Gateway for Woocommerce

WordPress plugin TurtleNetwork Gateway for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: tn-gateway-for-wo...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2019
  • Latest release: Apr 28, 2019
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: mirone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /464 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.03MB] [CPU: ▼5.50ms] Passed 4 tests

Analyzing server-side resources used by TurtleNetwork Gateway for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.50 ▼1.94
Dashboard /wp-admin3.34 ▲0.0349.80 ▼3.08
Posts /wp-admin/edit.php3.39 ▲0.0351.26 ▼4.90
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.31 ▼12.08
Media Library /wp-admin/upload.php3.26 ▲0.0338.39 ▼0.49

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TurtleNetwork Gateway for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.75 ▼0.3144.22 ▼1.06
Dashboard /wp-admin2,192 ▲125.63 ▲0.1088.55 ▼10.6541.62 ▲1.82
Posts /wp-admin/edit.php2,103 ▼01.99 ▲0.0440.05 ▼3.8838.33 ▼1.71
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▲0.22679.25 ▼55.0958.88 ▼3.08
Media Library /wp-admin/upload.php1,397 ▼34.20 ▼0.04103.39 ▼8.3245.71 ▼5.81

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'StephenHill\\ServiceInterface' not found in wp-content/plugins/tn-gateway-for-woocommerce/includes/base58/src/BCMathService.php:7
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/tn-gateway-for-woocommerce/includes/class-tn-gateway.php on line 237
    • > PHP Fatal error
      Uncaught Error: Interface 'StephenHill\\ServiceInterface' not found in wp-content/plugins/tn-gateway-for-woocommerce/includes/base58/src/GMPService.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Please fix this invalid url: "TN - 3Jd9EQX1yqtYhACBydpjNd43pNnFJFX8z3o, WAVES - 3PA8GR3PLpGmwYhSdQjTSK7sGnjeC2XQQS2"
The official readme.txt might help

tn-gateway-for-woocommerce/tn-gateway-for-woocommerce.php 92% from 13 tests

The entry point to "TurtleNetwork Gateway for Woocommerce" version 0.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Plugin Name: Please don't use more than 70 characters for the plugin name (currently 75 characters long)

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
Everything looks great! No dangerous files found in this plugin1,596 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP10161201745
JavaScript4147144665
PO File24244145
CSS11041

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.32
Average class complexity8.60
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods42
▷ Static methods819.05%
▷ Public methods3685.71%
▷ Protected methods12.38%
▷ Private methods511.90%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin