78% woo-poly-integration

Code Review | Hyyan WooCommerce Polylang Integration

WordPress plugin Hyyan WooCommerce Polylang Integration scored78%from 54 tests.

About plugin

  • Plugin page: woo-poly-integration
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.6.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2015
  • Latest release: Feb 16, 2021
  • Number of updates: 61
  • Update frequency: every 34.9 days
  • Top authors: hyyan (100%)

Code review

54 tests

User reviews

121 reviews

Install metrics

10,000+ active /175,872 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▼6.76ms] Passed 4 tests

This is a short check of server-side resources used by Hyyan WooCommerce Polylang Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1944.44 ▲2.59
Dashboard /wp-admin3.60 ▲0.2554.10 ▼15.50
Posts /wp-admin/edit.php3.65 ▲0.2951.34 ▼3.30
Add New Post /wp-admin/post-new.php6.12 ▲0.2394.66 ▼10.82
Media Library /wp-admin/upload.php3.46 ▲0.2342.49 ▲4.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 75 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
hyyan-wpi-flash-messages
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Hyyan WooCommerce Polylang Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.35 ▲0.201.71 ▼0.1443.47 ▲2.64
Dashboard /wp-admin2,224 ▲505.63 ▼0.0393.25 ▼2.6245.22 ▲1.80
Posts /wp-admin/edit.php2,129 ▲292.01 ▲0.0637.87 ▼3.2036.38 ▼1.49
Add New Post /wp-admin/post-new.php1,555 ▲2523.15 ▲0.14664.03 ▼32.2151.97 ▼20.27
Media Library /wp-admin/upload.php1,432 ▲324.22 ▼0.02100.76 ▼10.1050.14 ▲0.98

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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • hyyan-wpi-flash-messages
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 11× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/Admin/getHelp.php
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/Admin/about.php
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/Messages/activateError.php
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/admin.php
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/Messages/support.php
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/social.php
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/Admin/support.php
    • > /wp-content/plugins/woo-poly-integration/__init__.php
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/Messages/endpointsTranslations.php
    • > /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Views/badges.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_COD' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Gateways/GatewayCOD.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_BACS' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Gateways/GatewayBACS.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Admin/StatusReport.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Hyyan\\WPI\\Taxonomies\\TaxonomiesInterface' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Taxonomies/ShippingCalss.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Hyyan\\WPI\\Taxonomies\\TaxonomiesInterface' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Taxonomies/Tags.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Hyyan\\WPI\\Taxonomies\\TaxonomiesInterface' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Taxonomies/Attributes.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Hyyan\\WPI\\Admin\\AbstractSettings' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Admin/Features.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Hyyan\\WPI\\Admin\\SettingsInterface' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Admin/AbstractSettings.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Gateway_Cheque' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Gateways/GatewayCheque.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Hyyan\\WPI\\Taxonomies\\TaxonomiesInterface' not found in wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Taxonomies/Categories.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

woo-poly-integration/__init__.php 92% from 13 tests

The entry point to "Hyyan WooCommerce Polylang Integration" version 1.5.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-poly-integration.php" instead of "__init__.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
No dangerous file extensions were detected6,896 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP611,0423,4505,407
PO File2267406845
Markdown21340375
JavaScript45473237
JSON10032

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity19.12
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces7
Interfaces4
Traits0
Classes44
▷ Abstract classes12.27%
▷ Concrete classes4397.73%
▷ Final classes36.98%
Methods303
▷ Static methods7123.43%
▷ Public methods28192.74%
▷ Protected methods165.28%
▷ Private methods61.98%
Functions14
▷ Named functions214.29%
▷ Anonymous functions1285.71%
Constants33
▷ Global constants26.06%
▷ Class constants3193.94%
▷ Public constants31100.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
There are no PNG files in this plugin