77% zenloop-woocommerce-nps-platform

Code Review | zenloop for WooCommerce - Net Promoter Score (NPS) platform

WordPress plugin zenloop for WooCommerce - Net Promoter Score (NPS) platform scored77%from 54 tests.

About plugin

  • Plugin page: zenloop-woocommer...
  • Plugin version: 3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2018
  • Latest release: Apr 5, 2023
  • Number of updates: 27
  • Update frequency: every 71.2 days
  • Top authors: zenloop (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,698 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.35ms] Passed 4 tests

This is a short check of server-side resources used by zenloop for WooCommerce - Net Promoter Score (NPS) platform
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.88 ▼3.25
Dashboard /wp-admin3.44 ▲0.1346.71 ▼1.37
Posts /wp-admin/edit.php3.55 ▲0.1949.85 ▼0.64
Add New Post /wp-admin/post-new.php6.02 ▲0.1382.55 ▼4.15
Media Library /wp-admin/upload.php3.36 ▲0.1337.19 ▲3.20
zenloop Settings /wp-admin/options-general.php?page=wc_zenloop_setting_admin2.9817.88

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for zenloop for WooCommerce - Net Promoter Score (NPS) platform
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.48 ▲0.101.68 ▼0.5238.24 ▼6.27
Dashboard /wp-admin2,210 ▲254.86 ▼1.04107.18 ▲7.7537.57 ▼5.43
Posts /wp-admin/edit.php2,090 ▲12.00 ▲0.0037.63 ▼3.4734.09 ▼1.79
Add New Post /wp-admin/post-new.php1,517 ▼317.66 ▼5.62677.35 ▲81.3256.97 ▲4.66
Media Library /wp-admin/upload.php1,395 ▲44.17 ▼0.0598.54 ▲0.7540.69 ▼6.37
zenloop Settings /wp-admin/options-general.php?page=wc_zenloop_setting_admin450.440.099.43

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 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wc_zenloop_setting_admin
    • > Notice in wp-content/plugins/zenloop-woocommerce-nps-platform/woocommerce-zenloop.php+129
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=wc_zenloop_setting_admin
    • > Notice in wp-content/plugins/zenloop-woocommerce-nps-platform/woocommerce-zenloop.php+131
    Undefined offset: 1
    • > GET request to /wp-admin/options-general.php?page=wc_zenloop_setting_admin
    • > Error in wp-content/plugins/zenloop-woocommerce-nps-platform/woocommerce-zenloop.php+149
    Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone () in wp-content/plugins/zenloop-woocommerce-nps-platform/woocommerce-zenloop.php:149
    Stack trace:
    #0 wp-content/plugins/zenloop-woocommerce-nps-platform/woocommerce-zenloop.php(149): DateTimeZone->__construct()
    #1 wp-content/plugins/zenloop-woocommerce-nps-platform/woocommerce-zenloop.php(65): WC_Zenloop->cron_activate()
    #2 wp-includes/class-wp-hook.php(310): WC_Zenloop->main()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-settings.php(632): do_action()
    #6 wp-config.php(129): require_once('/var/www/wordpr...')
    #7 wp-load.php(50): require_once('/var/www/wordpr...')
    #8 wp-admin/admin.php(34): require_once('/var/www/wordpr...')
    #9 wp-admin/options-general.php

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=wc_zenloop_setting_admin
    • > Network (severe)
    wp-admin/options-general.php?page=wc_zenloop_setting_admin - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: surveys, feedback, net promoter score, nps

zenloop-woocommerce-nps-platform/woocommerce-zenloop.php 69% from 13 tests

"zenloop for WooCommerce - Net Promoter Score (NPS) platform" version 3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.6" instead of "2.6.0")
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("zenloop-woocommerce-nps-platform.php" instead of "woocommerce-zenloop.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin771 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP221470619
PO File13737103
SVG10149

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity58.50
▷ Minimum class complexity42.00
▷ Maximum class complexity75.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods41
▷ Static methods12.44%
▷ Public methods2663.41%
▷ Protected methods00.00%
▷ Private methods1536.59%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin