83% latitude-interest-free-gateway-for-woocommerce

Code Review | Latitude Interest Free Gateway for WooCommerce

WordPress plugin Latitude Interest Free Gateway for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: latitude-interest...
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-5.8
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: May 18, 2022
  • Number of updates: 32
  • Update frequency: every 9.2 days
  • Top authors: latitudefinancial (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,312 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Latitude Interest Free Gateway for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.39 ▼1.97
Dashboard /wp-admin3.31 ▲0.0149.48 ▲2.10
Posts /wp-admin/edit.php3.36 ▲0.0147.77 ▼0.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.60 ▼14.43
Media Library /wp-admin/upload.php3.23 ▲0.0133.96 ▲2.28

Server storage [IO: ▲0.10MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Latitude Interest Free Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.84 ▲0.2140.65 ▲2.22
Dashboard /wp-admin2,195 ▲155.48 ▼0.1882.26 ▼3.9439.37 ▼3.63
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0540.75 ▲4.7336.40 ▲3.34
Add New Post /wp-admin/post-new.php1,535 ▲923.23 ▼0.41665.34 ▼14.1159.14 ▼4.01
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0193.12 ▼0.2542.49 ▲0.46

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

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

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      The use statement with non-compound name 'Latitude_Checkout_Environment_Settings' has no effect in wp-content/plugins/latitude-interest-free-gateway-for-woocommerce/classes/wc-latitudecheckout-gateway.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/latitude-interest-free-gateway-for-woocommerce/classes/wc-latitudecheckout-gateway.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/latitude-interest-free-gateway-for-woocommerce/includes/admin-form.php:9
    • > PHP Warning
      The use statement with non-compound name 'Latitude_Checkout_Constants' has no effect in wp-content/plugins/latitude-interest-free-gateway-for-woocommerce/classes/api-callback-handler.php on line 10
    • > PHP Warning
      The use statement with non-compound name 'Latitude_Checkout_Environment_Settings' has no effect in wp-content/plugins/latitude-interest-free-gateway-for-woocommerce/classes/services/service-api.php on line 9

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 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

latitude-interest-free-gateway-for-woocommerce/latitude-checkout-for-woocommerce.php 77% from 13 tests

The main PHP file in "Latitude Interest Free Gateway for WooCommerce" ver. 1.0.8 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "3.2.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("latitude-interest-free-gateway-for-woocommerce.php" instead of "latitude-checkout-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,793 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP193435351,724
JavaScript24063
CSS1004
Markdown1102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.19
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods128
▷ Static methods1713.28%
▷ Public methods7155.47%
▷ Protected methods86.25%
▷ Private methods4938.28%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants68
▷ Global constants34.41%
▷ Class constants6595.59%
▷ Public constants65100.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 files were detected