83% atensiq-connector-for-woocommerce

Code Review | Atensiq Restaurant menu & Connector for WooCommerce

WordPress plugin Atensiq Restaurant menu & Connector for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: atensiq-connector...
  • Plugin version: 3.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2019
  • Latest release: Dec 4, 2020
  • Number of updates: 56
  • Update frequency: every 8.5 days
  • Top authors: atensiq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /973 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.41ms] Passed 4 tests

Server-side resources used by Atensiq Restaurant menu & Connector for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.20 ▲2.00
Dashboard /wp-admin3.31 ▲0.0151.98 ▼0.20
Posts /wp-admin/edit.php3.36 ▲0.0045.85 ▼2.22
Add New Post /wp-admin/post-new.php5.89 ▲0.00107.24 ▲7.50
Media Library /wp-admin/upload.php3.23 ▲0.0036.91 ▲2.06

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Atensiq Restaurant menu & Connector for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.17 ▼0.181.91 ▲0.0544.90 ▲1.78
Dashboard /wp-admin2,209 ▲285.59 ▼0.1398.07 ▼6.8743.32 ▲0.88
Posts /wp-admin/edit.php2,111 ▲111.99 ▼0.0236.89 ▲0.6935.94 ▼0.61
Add New Post /wp-admin/post-new.php1,532 ▲623.21 ▲0.14621.85 ▼21.0652.32 ▼0.48
Media Library /wp-admin/upload.php1,408 ▲84.23 ▲0.07101.52 ▼1.1245.43 ▼0.68

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WCAT\\Api' not found in wp-content/plugins/atensiq-connector-for-woocommerce/src/classes/Actions/Api.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/atensiq-connector-for-woocommerce/src/setup.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/atensiq-connector-for-woocommerce/atensiq-wc-connector.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atensiq-connector-for-woocommerce/src/scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atensiq-connector-for-woocommerce/src/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: food menu, woocommerce, restaurant orders, qr menu, restaurant menu...

atensiq-connector-for-woocommerce/atensiq-wc-connector.php 69% from 13 tests

"Atensiq Restaurant menu & Connector for WooCommerce" version 3.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("atensiq-connector-for-woocommerce.php" instead of "atensiq-wc-connector.php")
  • Domain Path: Prefix the domain path with a forward slash character ("/langs")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("langs")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,844 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP1427020994
CSS23135444
JavaScript1394207
PO File14042121
SVG70778

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity14.67
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods55
▷ Static methods2545.45%
▷ Public methods5090.91%
▷ Protected methods47.27%
▷ Private methods11.82%
Functions15
▷ Named functions640.00%
▷ Anonymous functions960.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin