78% epos-gateway-for-woocommerce

Code Review | EPOS Gateway for WooCommerce

WordPress plugin EPOS Gateway for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: epos-gateway-for-...
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2020
  • Latest release: Sep 20, 2023
  • Number of updates: 43
  • Update frequency: every 27.8 days
  • Top authors: nmekh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /903 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by EPOS Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.25 ▲7.96
Dashboard /wp-admin3.31 ▲0.0144.38 ▼3.90
Posts /wp-admin/edit.php3.36 ▲0.0148.49 ▼0.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.21 ▼18.87
Media Library /wp-admin/upload.php3.24 ▲0.0135.45 ▲1.42

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for EPOS Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.84 ▲0.092.06 ▲0.2543.81 ▼6.21
Dashboard /wp-admin2,203 ▲155.85 ▲0.91107.16 ▼7.8941.28 ▼5.67
Posts /wp-admin/edit.php2,086 ▼31.98 ▼0.0534.69 ▼2.0830.39 ▼8.35
Add New Post /wp-admin/post-new.php1,538 ▲2423.15 ▲5.43652.45 ▼21.5555.49 ▼5.48
Media Library /wp-admin/upload.php1,382 ▼34.22 ▲0.0195.63 ▼8.1342.04 ▼1.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 18× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/configurator_xml.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/cache.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/configurator_basic.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/filter_levelrange.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/configurator_php.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/layout_xml.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/filter_stringmatch.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/package.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/mdc.php
    • > /wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/examples/php/layout_pattern.php
  • 401× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Com\\Tecnick\\Barcode\\Type' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/tecnickcom/tc-lib-barcode/src/Type/Linear.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'esas\\cmsgate\\utils\\htmlbuilder\\page\\SingleFormPage' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/esas/cmsgate-core/src/esas/cmsgate/utils/htmlbuilder/page/StorableFormPage.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'esas\\cmsgate\\view\\admin\\validators\\ValidatorUploadFile' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/esas/cmsgate-core/src/esas/cmsgate/view/admin/validators/ValidatorUploadFileSize.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'esas\\cmsgate\\view\\admin\\validators\\Validator' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/esas/cmsgate-core/src/esas/cmsgate/view/admin/validators/ValidatorUploadFile.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'esas\\cmsgate\\hro\\HRO' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/esas/cmsgate-core/src/esas/cmsgate/hro/tables/TableHRO.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'LoggerPatternConverterSuperglobal' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/apache/log4php/src/main/php/pattern/LoggerPatternConverterServer.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'esas\\cmsgate\\hro\\forms\\FormHRO_v1' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/esas/cmsgate-core/src/esas/cmsgate/hro/forms/FormHRO_v2.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'esas\\cmsgate\\descriptors\\AbstractDescriptor' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/esas/cmsgate-core/src/esas/cmsgate/descriptors/ModuleDescriptor.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Com\\Tecnick\\Barcode\\Type\\Linear' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/tecnickcom/tc-lib-barcode/src/Type/Linear/Imb.php:55
    • > PHP Fatal error
      Uncaught Error: Class 'Com\\Tecnick\\Barcode\\Type\\Linear\\EanOneThree' not found in wp-content/plugins/epos-gateway-for-woocommerce/vendor/tecnickcom/tc-lib-barcode/src/Type/Linear/EanEight.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

epos-gateway-for-woocommerce/cmsgate-woocommerce-epos-hooks.php 85% from 13 tests

The primary PHP file in "EPOS Gateway for WooCommerce" version 2.0.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "3.0.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("epos-gateway-for-woocommerce.php" instead of "cmsgate-woocommerce-epos-hooks.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected48,988 lines of code in 639 files:
LanguageFilesBlank linesComment linesLines of code
PHP5415,44917,96827,287
JavaScript132,2712,1218,950
XML497976395,123
CSS8925654,936
JSON800637
Velocity Template Language11139435
Markdown81250354
make396120323
SVG200313
Maven13021305
Ant11930140
YAML3152116
DTD1255469

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.25
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces68
Interfaces48
Traits0
Classes441
▷ Abstract classes6013.61%
▷ Concrete classes38186.39%
▷ Final classes00.00%
Methods2,576
▷ Static methods45817.78%
▷ Public methods2,24787.23%
▷ Protected methods2579.98%
▷ Private methods722.80%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants310
▷ Global constants123.87%
▷ Class constants29896.13%
▷ Public constants298100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/apache/log4php/src/site/resources/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
vendor/apache/log4php/src/site/resources/images/logos/maven-feather.png3.25KB2.04KB▼ 37.24%
vendor/esas/cmsgate-epos-lib/static/image/ps_icons.png3.42KB2.02KB▼ 40.78%
vendor/apache/log4php/src/site/resources/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%