83% e-nkap-woocommerce-gateway

Code Review | SmobilPay for e-commerce - Mobile Money Gateway for WooCommerce

WordPress plugin SmobilPay for e-commerce - Mobile Money Gateway for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: e-nkap-woocommerc...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 7, 2021
  • Latest release: Nov 12, 2023
  • Number of updates: 22
  • Update frequency: every 34.9 days
  • Top authors: camoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,147 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.19ms] Passed 4 tests

Analyzing server-side resources used by SmobilPay for e-commerce - Mobile Money Gateway for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.15 ▲2.01
Dashboard /wp-admin3.40 ▲0.0643.96 ▼16.63
Posts /wp-admin/edit.php3.52 ▲0.1647.98 ▲5.05
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.89 ▼0.48
Media Library /wp-admin/upload.php3.33 ▲0.1036.29 ▼1.66

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 531 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for SmobilPay for e-commerce - Mobile Money Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.32 ▲0.042.02 ▲0.0641.84 ▼0.62
Dashboard /wp-admin2,195 ▲175.61 ▼0.0991.65 ▼9.3342.82 ▲2.29
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0138.45 ▲1.7836.42 ▲2.12
Add New Post /wp-admin/post-new.php1,526 ▼123.25 ▲0.07645.51 ▼68.6356.40 ▲3.51
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.13100.15 ▼5.3141.54 ▼2.13

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 173× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/guzzlehttp/promises/src/RejectedPromise.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Cache\\Marshaller\\MarshallerInterface' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/guzzlehttp/psr7/src/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/defuse/php-encryption/src/Exception/EnvironmentIsBrokenException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOption\\Option' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/phpoption/phpoption/src/PhpOption/Some.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\AdapterInterface' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Cache\\Adapter\\AbstractTagAwareAdapter' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php:48
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/guzzlehttp/guzzle/src/Client.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/e-nkap-woocommerce-gateway/vendor/guzzlehttp/promises/src/TaskQueue.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

e-nkap-woocommerce-gateway/e-nkap-woocommerce-gateway.php 77% from 13 tests

This is the main PHP file of "SmobilPay for e-commerce - Mobile Money Gateway for WooCommerce" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: Required version does not match the one declared in readme.txt ("4.8" instead of "3.2")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 plugin41,971 lines of code in 481 files:
LanguageFilesBlank linesComment linesLines of code
PHP3946,04413,51731,512
Markdown482,36007,024
JSON31103,297
YAML232843
SQL10029
make19426
XML10019
CSS21018
Bourne Shell1203

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity12.86
▷ Minimum class complexity1.00
▷ Maximum class complexity209.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces65
Interfaces64
Traits14
Classes256
▷ Abstract classes83.12%
▷ Concrete classes24896.88%
▷ Final classes9638.71%
Methods2,029
▷ Static methods43021.19%
▷ Public methods1,61379.50%
▷ Protected methods1658.13%
▷ Private methods25112.37%
Functions343
▷ Named functions12335.86%
▷ Anonymous functions22064.14%
Constants193
▷ Global constants84.15%
▷ Class constants18595.85%
▷ Public constants13271.35%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/assets/images/e-nkap.png2.32KB2.37KB0.00%