89% 123tcs-gift-card-payments-for-woocommerce

Code Review | 123TCS Gift Card Payments for WooCommerce

WordPress plugin 123TCS Gift Card Payments for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: 123tcs-gift-card-...
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.8.1
  • WordPress version: 5.9.2
  • First release: Apr 30, 2021
  • Latest release: Nov 3, 2021
  • Number of updates: 23
  • Update frequency: every 8.2 days
  • Top authors: michelts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 441 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▲572.16ms] 75% from 4 tests

This is a short check of server-side resources used by 123TCS Gift Card Payments for WooCommerce
Please fix the following
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 572.16ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.53463.47 ▲413.56
Dashboard /wp-admin3.86 ▲0.451,049.55 ▲1,009.94
Posts /wp-admin/edit.php4.13 ▲0.491,095.22 ▲1,057.78
Add New Post /wp-admin/post-new.php7.36 ▲0.391,119.90 ▼152.40
Media Library /wp-admin/upload.php3.86 ▲0.561,045.69 ▲1,017.54

Server storage [IO: ▲0.17MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 1 new option
New WordPress options
TCS_GCP_plugin_options

Browser metrics Passed 4 tests

An overview of browser requirements for 123TCS Gift Card Payments for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,864 ▲11016.06 ▲0.326.07 ▼0.322.27 ▼0.46
Dashboard /wp-admin2,977 ▲1196.12 ▼0.06116.32 ▼13.83153.24 ▼0.71
Posts /wp-admin/edit.php2,771 ▲773.36 ▲0.1264.66 ▲0.11145.16 ▲2.90
Add New Post /wp-admin/post-new.php1,804 ▲17321.46 ▲1.28484.39 ▲73.39159.84 ▲6.97
Media Library /wp-admin/upload.php1,786 ▲915.53 ▲0.01149.83 ▲14.58188.73 ▲3.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/123tcs-gift-card-payments-for-woocommerce/includes/settings.php+201
    Trying to access array offset on value of type null

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 everything seems fine, this is not 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: 123tcs, woocommerce, payment, gift cards

123tcs-gift-card-payments-for-woocommerce/tcs-gift-card-payments-for-woocommerce.php 77% from 13 tests

The entry point to "123TCS Gift Card Payments for WooCommerce" version 1.6.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.7.1" instead of "5.7")
  • Main file name: The principal plugin file should be the same as the plugin slug ("123tcs-gift-card-payments-for-woocommerce.php" instead of "tcs-gift-card-payments-for-woocommerce.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin2,557 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP234942212,187
PO File1104117289
JavaScript2181861
CSS14320

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.07
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods111
▷ Static methods10.90%
▷ Public methods10493.69%
▷ Protected methods00.00%
▷ Private methods76.31%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-123tcs-white.png13.54KB5.43KB▼ 59.87%