84% woocommerce-total-web-solutions-gateway

Code Review | WC Total Web Solutions Gateway

WordPress plugin WC Total Web Solutions Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-total...
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: Jun 26, 2023
  • Number of updates: 48
  • Update frequency: every 76.8 days
  • Top authors: Total Web Solutions (79.17%)Morg0n (22.92%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,050 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.01ms] Passed 4 tests

Server-side resources used by WC Total Web Solutions Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0141.70 ▼5.25
Dashboard /wp-admin3.57 ▼0.0650.29 ▼18.32
Posts /wp-admin/edit.php3.68 ▲0.0155.33 ▲2.10
Add New Post /wp-admin/post-new.php6.15 ▲0.0190.20 ▼16.84
Media Library /wp-admin/upload.php3.49 ▲0.0041.14 ▲0.37

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

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

Browser metrics Passed 4 tests

WC Total Web Solutions Gateway: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.20 ▲0.032.05 ▼0.3844.57 ▼3.34
Dashboard /wp-admin2,198 ▲215.66 ▼0.0184.40 ▼14.1442.99 ▲4.91
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0337.62 ▲0.3336.37 ▲5.99
Add New Post /wp-admin/post-new.php1,545 ▲1923.47 ▲6.01676.98 ▼25.1160.50 ▲0.34
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.00111.59 ▲4.5247.35 ▲1.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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 no errors were found, this is by no means 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
Please fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetRequest' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/includes/sdk/AuthorizeNetAIM.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetResponse' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/includes/sdk/AuthorizeNetSIM.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetRequest' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/includes/sdk/AuthorizeNetTD.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetAIM' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/includes/sdk/AuthorizeNetCP.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetRequest' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/includes/sdk/AuthorizeNetCIM.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/gateway-totalweb.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetSIM_Form' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/includes/sdk/AuthorizeNetDPM.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-total-web-solutions-gateway/index.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'AuthorizeNetRequest' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/includes/sdk/AuthorizeNetARB.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/woocommerce-total-web-solutions-gateway/includes/sdk/AuthorizeNetSOAP.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "N/A"
You can look at the official readme.txt

woocommerce-total-web-solutions-gateway/index.php 92% from 13 tests

The primary PHP file in "WC Total Web Solutions Gateway" version 2.3.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-total-web-solutions-gateway.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,951 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP164021,1151,951

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes13.57%
▷ Concrete classes2796.43%
▷ Final classes00.00%
Methods128
▷ Static methods53.91%
▷ Public methods10682.81%
▷ Protected methods1814.06%
▷ Private methods43.12%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants15.26%
▷ Class constants1894.74%
▷ Public constants18100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/SupportedCardsMain.png7.91KB3.82KB▼ 51.69%
images/authorize-net-co.png5.37KB1.91KB▼ 64.53%
images/totalweb.png3.09KB2.31KB▼ 25.12%
images/SupportedCardswithAmex.png15.22KB4.50KB▼ 70.44%