84% tmoni-woocommerce-gateway

Code Review | Tmoni WooCommerce Payment Gateway

WordPress plugin Tmoni WooCommerce Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: tmoni-woocommerce...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.6
  • WordPress version: 6.3.1
  • First release: Jan 24, 2017
  • Latest release: Feb 10, 2017
  • Number of updates: 10
  • Update frequency: every 1.6 days
  • Top authors: samparsky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /491 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: ▼2.60ms] Passed 4 tests

An overview of server-side resources used by Tmoni WooCommerce Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.29 ▼2.92
Dashboard /wp-admin3.32 ▲0.0145.32 ▼15.14
Posts /wp-admin/edit.php3.37 ▲0.0155.93 ▲4.91
Add New Post /wp-admin/post-new.php5.90 ▲0.01102.86 ▲9.31
Media Library /wp-admin/upload.php3.24 ▲0.0138.58 ▲2.75

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Tmoni WooCommerce Payment Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.421.79 ▼0.4343.96 ▼0.43
Dashboard /wp-admin2,192 ▲185.61 ▲0.0391.41 ▼4.8341.16 ▲1.84
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0339.27 ▲4.3542.37 ▲6.35
Add New Post /wp-admin/post-new.php1,535 ▲918.06 ▼4.99632.77 ▼12.3568.69 ▲4.24
Media Library /wp-admin/upload.php1,397 ▼04.16 ▼0.0999.17 ▼2.5843.60 ▲3.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/tmoni-woocommerce-gateway/woocommerce-tmoni.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: direct debit, tmoni, woocommerce, payment gateways, nigeria...

tmoni-woocommerce-gateway/tmoni-payment-woocommerce.php 92% from 13 tests

Analyzing the main PHP file in "Tmoni WooCommerce Payment Gateway" version 1.0.2
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("tmoni-woocommerce-gateway.php" instead of "tmoni-payment-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin303 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29769303

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/tmoni-logo.png4.86KB2.26KB▼ 53.54%