84% onesight-integration-for-woocommerce

Code Review | OneSight Integration for WooCommerce

WordPress plugin OneSight Integration for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: onesight-integrat...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2023
  • Latest release: Apr 30, 2023
  • Number of updates: 3
  • Update frequency: every 6.0 days
  • Top authors: onesight (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.80ms] Passed 4 tests

Server-side resources used by OneSight Integration for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.30 ▼8.88
Dashboard /wp-admin3.32 ▲0.0248.13 ▼4.47
Posts /wp-admin/edit.php3.37 ▲0.0148.26 ▲0.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.36 ▼1.91
Media Library /wp-admin/upload.php3.24 ▲0.0139.46 ▲4.02

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for OneSight Integration for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.221.72 ▼0.3046.09 ▲5.88
Dashboard /wp-admin2,206 ▲185.81 ▲0.93100.86 ▼11.9936.69 ▼5.01
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0237.51 ▲0.9732.59 ▼0.08
Add New Post /wp-admin/post-new.php1,533 ▼123.38 ▲0.08586.80 ▼47.2871.25 ▼0.93
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.06106.32 ▼1.1542.42 ▼3.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/onesight-integration-for-woocommerce/Routes/RegisterRoutes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_rest_route() in wp-content/plugins/onesight-integration-for-woocommerce/Routes/config.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/onesight-integration-for-woocommerce/Routes/RegisterRoutes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_rest_route() in wp-content/plugins/onesight-integration-for-woocommerce/Routes/table.php:102

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Screenshots are stored in the /assets directory.), #2 (This is the second screen shot)
You can take inspiration from this readme.txt

onesight-integration-for-woocommerce/onesight-analytics-tool-plugin.php 92% from 13 tests

Analyzing the main PHP file in "OneSight Integration for WooCommerce" version 1.1
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("onesight-integration-for-woocommerce.php" instead of "onesight-analytics-tool-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected393 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP66152393

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions1280.00%
▷ Anonymous functions320.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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