82% mantiq-integration-for-woocommerce

Code Review | Mantiq Integration for WooCommerce

WordPress plugin Mantiq Integration for WooCommerce scored82%from 54 tests.

About plugin

  • Plugin page: mantiq-integratio...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2021
  • Latest release: Dec 7, 2021
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: mantiq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /276 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.37ms] Passed 4 tests

This is a short check of server-side resources used by Mantiq Integration for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.82 ▼9.54
Dashboard /wp-admin3.32 ▲0.0244.96 ▼2.94
Posts /wp-admin/edit.php3.38 ▲0.0247.59 ▲3.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.32 ▼1.93
Media Library /wp-admin/upload.php3.25 ▲0.0235.90 ▲0.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 75 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mantiq Integration for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▲0.021.69 ▼0.0839.56 ▼2.82
Dashboard /wp-admin2,192 ▲125.52 ▼0.0984.66 ▼2.2239.23 ▼0.87
Posts /wp-admin/edit.php2,103 ▲241.96 ▼0.0335.88 ▼0.9729.40 ▼4.19
Add New Post /wp-admin/post-new.php1,537 ▲923.09 ▲0.03587.80 ▼36.9270.49 ▲20.74
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.0799.61 ▼0.1445.58 ▼0.90

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 51× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mantiq-integration-for-woocommerce/views/actions/orders/add-note-to-order.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Mantiq\\Models\\Action' not found in wp-content/plugins/mantiq-integration-for-woocommerce/src/Actions/WooCommerce/Orders/AddProductItemToOrder.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Mantiq\\Models\\Action' not found in wp-content/plugins/mantiq-integration-for-woocommerce/src/Actions/WooCommerce/Orders/GetOrder.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Mantiq\\Models\\TriggerEvent' not found in wp-content/plugins/mantiq-integration-for-woocommerce/src/Triggers/Events/WooCommerce/Developers/CartLoaded.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Mantiq\\Models\\TriggerEvent' not found in wp-content/plugins/mantiq-integration-for-woocommerce/src/Triggers/Events/WooCommerce/Orders/OrderProcessing.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mantiq-integration-for-woocommerce/views/actions/coupons/delete-coupon.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Mantiq\\Models\\TriggerEvent' not found in wp-content/plugins/mantiq-integration-for-woocommerce/src/Triggers/Events/WooCommerce/Carts/CartAbandoned.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Mantiq\\Models\\Action' not found in wp-content/plugins/mantiq-integration-for-woocommerce/src/Actions/WooCommerce/Orders/ResendOrderDetailsToCustomer.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mantiq-integration-for-woocommerce/views/actions/orders/resend-new-order-notification.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mantiq-integration-for-woocommerce/views/actions/orders/add-fee-item-to-order.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 76% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (WooCommerce events), #2 (WooCommerce actions)
Please take inspiration from this readme.txt

mantiq-integration-for-woocommerce/plugin.php 54% from 13 tests

The main PHP file in "Mantiq Integration for WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 182 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0.0" instead of "5.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("mantiq-integration-for-woocommerce.php" instead of "plugin.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

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 detected4,421 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP51522514,421

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.62
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods204
▷ Static methods157.35%
▷ Public methods204100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected