84% pagaris-para-woocommerce

Code Review | Pagaris para Woocommerce

WordPress plugin Pagaris para Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: pagaris-para-wooc...
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-5.3.2
  • WordPress version: 6.3.1
  • First release: Oct 18, 2019
  • Latest release: Sep 30, 2020
  • Number of updates: 12
  • Update frequency: every 29.1 days
  • Top authors: pagaris (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /507 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼4.88ms] Passed 4 tests

An overview of server-side resources used by Pagaris para Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3737.15 ▲0.40
Dashboard /wp-admin3.68 ▲0.3749.07 ▲2.47
Posts /wp-admin/edit.php3.73 ▲0.3750.99 ▼5.76
Add New Post /wp-admin/post-new.php6.20 ▲0.3183.63 ▼16.63
Media Library /wp-admin/upload.php3.54 ▲0.3138.78 ▲2.62

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 170 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Pagaris para Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.281.76 ▼0.0240.28 ▲0.36
Dashboard /wp-admin2,206 ▲154.90 ▼0.01111.67 ▲10.4240.09 ▼5.42
Posts /wp-admin/edit.php2,092 ▲62.15 ▲0.1040.57 ▲0.3935.65 ▲0.23
Add New Post /wp-admin/post-new.php1,542 ▲2323.36 ▲0.05666.48 ▼14.5559.79 ▼6.26
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.07107.97 ▲7.7146.80 ▼0.88

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 48× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Pagaris\\TestCase' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/pagaris/pagaris-php/tests/ClientTest.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/guzzlehttp/psr7/src/Stream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/guzzlehttp/psr7/src/FnStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/guzzlehttp/guzzle/src/Client.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/pagaris-para-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (52 tag instead of maximum 10)
The official readme.txt might help

pagaris-para-woocommerce/pagaris-gateway.php 92% from 13 tests

The principal PHP file in "Pagaris para Woocommerce" v. 1.1.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pagaris-para-woocommerce.php" instead of "pagaris-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected12,741 lines of code in 124 files:
LanguageFilesBlank linesComment linesLines of code
PHP1021,7734,8378,889
Markdown121,03703,269
JSON800566
make1409
XML1108

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.97
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces9
Interfaces14
Traits2
Classes73
▷ Abstract classes22.74%
▷ Concrete classes7197.26%
▷ Final classes811.27%
Methods697
▷ Static methods8011.48%
▷ Public methods57282.07%
▷ Protected methods101.43%
▷ Private methods11516.50%
Functions146
▷ Named functions5940.41%
▷ Anonymous functions8759.59%
Constants57
▷ Global constants00.00%
▷ Class constants57100.00%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected