84% viator-integration-for-wp

Code Review | Viator Integration For WP

WordPress plugin Viator Integration For WP scored84%from 54 tests.

About plugin

  • Plugin page: viator-integratio...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-6.4
  • WordPress version: 6.3.1
  • First release: Jan 5, 2023
  • Latest release: Nov 30, 2023
  • Number of updates: 5
  • Update frequency: every 65.8 days
  • Top authors: integratordev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /390 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Viator Integration For WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.17 ▼6.50
Dashboard /wp-admin3.34 ▼0.0146.57 ▼16.00
Posts /wp-admin/edit.php3.39 ▲0.0348.39 ▲4.19
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.53 ▼10.84
Media Library /wp-admin/upload.php3.26 ▲0.0331.79 ▼2.32

Server storage [IO: ▲0.12MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Viator Integration For WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲16814.40 ▼0.291.56 ▼0.1341.37 ▼4.92
Dashboard /wp-admin2,323 ▲1465.79 ▲0.13102.27 ▲10.3049.54 ▲4.21
Posts /wp-admin/edit.php2,231 ▲1282.32 ▲0.3549.32 ▲8.0441.55 ▲8.98
Add New Post /wp-admin/post-new.php1,569 ▲4323.19 ▼0.08681.10 ▲18.5854.45 ▲2.52
Media Library /wp-admin/upload.php1,528 ▲1254.37 ▲0.17104.28 ▲5.9146.09 ▲3.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(VIATORWP_PLUGIN_DIRadmin/viator_admin_subpages.php): failed to open stream: No such file or directory in wp-content/plugins/viator-integration-for-wp/admin/settings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/viator-integration-for-wp/admin/viator_admin_woocommerce.php:228
    • > PHP Fatal error
      require_once(): Failed opening required 'VIATORWP_PLUGIN_DIRadmin/viator_admin_subpages.php' (include_path='.:/usr/share/php') in wp-content/plugins/viator-integration-for-wp/admin/settings.php on line 5
    • > PHP Warning
      require_once(VIATORWP_PLUGIN_DIRfrontend/viator_add_product_custom_tabs.php): failed to open stream: No such file or directory in wp-content/plugins/viator-integration-for-wp/frontend/viator_frontend_shop.php on line 2
    • > PHP Warning
      Use of undefined constant VIATORWP_PLUGIN_DIR - assumed 'VIATORWP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/viator-integration-for-wp/admin/settings.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/viator-integration-for-wp/frontend/viator_add_product_custom_tabs.php:2
    • > PHP Warning
      Use of undefined constant VIATORWP_PLUGIN_DIR - assumed 'VIATORWP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/viator-integration-for-wp/frontend/viator_frontend_shop.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'VIATORWP_PLUGIN_DIRfrontend/viator_add_product_custom_tabs.php' (include_path='.:/usr/share/php') in wp-content/plugins/viator-integration-for-wp/frontend/viator_frontend_shop.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/viator-integration-for-wp/admin/viator_admin_api.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/viator-integration-for-wp/admin/vas-admin-cronjab-settings.php:2

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: sync, product, import, ecommerce, api

viator-integration-for-wp/viator-integration-for-wp.php 92% from 13 tests

"Viator Integration For WP" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,271 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11182851,892
JavaScript2207242
CSS32310137

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity10.50
▷ Minimum class complexity8.00
▷ Maximum class complexity13.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
There were not PNG files found in your plugin