90% payl8r-finance-gateway-for-woocommerce

Code Review | PayL8r Gateway for WooCommerce

WordPress plugin PayL8r Gateway for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: payl8r-finance-ga...
  • Plugin version: 1.5.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.3
  • WordPress version: 6.3.1
  • First release: May 31, 2019
  • Latest release: Sep 18, 2023
  • Number of updates: 39
  • Update frequency: every 41.6 days
  • Top authors: payl8r (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,300 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: ▼4.13ms] Passed 4 tests

An overview of server-side resources used by PayL8r Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.28 ▼8.91
Dashboard /wp-admin3.33 ▲0.0344.59 ▼7.33
Posts /wp-admin/edit.php3.45 ▲0.0949.77 ▲4.72
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.07 ▲0.47
Media Library /wp-admin/upload.php3.26 ▲0.0335.96 ▼0.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
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
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for PayL8r Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.55 ▼0.631.59 ▼0.3342.22 ▼0.75
Dashboard /wp-admin2,213 ▲255.86 ▲0.97106.61 ▼8.6342.78 ▼6.09
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0041.63 ▲4.8735.71 ▲3.89
Add New Post /wp-admin/post-new.php1,537 ▼123.23 ▼0.26601.21 ▼99.8058.46 ▼5.44
Media Library /wp-admin/upload.php1,389 ▲44.19 ▲0.0099.62 ▼5.1244.76 ▲1.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: comments, spam

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

The entry point to "PayL8r Gateway for WooCommerce" version 1.5.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("payl8r-finance-gateway-for-woocommerce.php" instead of "woocommerce-gateway-payl8r.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 detected677 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5162304603
SVG10139
Markdown115035

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.25
▷ Minimum class complexity10.00
▷ Maximum class complexity19.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods37.50%
▷ Public methods3485.00%
▷ Protected methods410.00%
▷ Private methods25.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/payl8r@2x.png15.11KB6.75KB▼ 55.31%
assets/images/Payl8rLogoButton.png17.86KB6.96KB▼ 61.06%