82% chill-survey-lite

Code Review | Chill Survey Lite

WordPress plugin Chill Survey Lite scored 82% from 54 tests.

About plugin

  • Plugin page: chill-survey-lite
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 5.8.1
  • First release: Jul 25, 2018
  • Latest release: Jul 25, 2018
  • Number of updates: 19
  • Update frequency: N/A
  • Top authors: simonelogicimage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 349 total downloads

Benchmarks

Plugin footprint Passed 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.15MB] [CPU: ▼141.97ms] Passed 4 tests

This is a short check of server-side resources used by Chill Survey Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2638.53 ▲12.30
Dashboard /wp-admin3.20 ▲0.1546.76 ▼9.83
Posts /wp-admin/edit.php3.29 ▲0.1850.04 ▲9.10
Add New Post /wp-admin/post-new.php5.57 ▲0.13102.72 ▼545.33
Media Library /wp-admin/upload.php3.14 ▲0.1434.32 ▼21.80
Questions /wp-admin/admin.php?page=csi_questions3.0933.20
Chill Survey /wp-admin/admin.php?page=csi_options3.0931.35
Feedback /wp-admin/admin.php?page=csi_feedback3.0930.19
Results /wp-admin/admin.php?page=csi_results3.0932.04

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 23 new files
Database: 3 new tables, 1 new option
New tables
wp_csi_questions
wp_csi_results
wp_csi_options
New WordPress options
my_csi_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Chill Survey Lite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,868 ▲27216.73 ▲1.4016.63 ▲4.7479.60 ▲25.58
Dashboard /wp-admin3,045 ▲1086.59 ▲0.68140.79 ▼13.99121.27 ▲2.05
Posts /wp-admin/edit.php2,817 ▲782.99 ▲0.3079.44 ▲8.67111.05 ▲12.06
Add New Post /wp-admin/post-new.php1,655 ▼2818.47 ▲2.51358.72 ▼68.71129.03 ▲12.91
Media Library /wp-admin/upload.php1,885 ▲785.40 ▲0.38140.06 ▼14.94124.62 ▼9.92
Questions /wp-admin/admin.php?page=csi_questions1,2982.6365.4195.11
Chill Survey /wp-admin/admin.php?page=csi_options1,6463.0881.9987.64
Feedback /wp-admin/admin.php?page=csi_feedback1,2152.5659.9293.69
Results /wp-admin/admin.php?page=csi_results1,1852.5760.2974.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=csi_questions
    • > Notice in wp-content/plugins/chill-survey-lite/classes/settings.php+129
    Undefined index: save_csi_questions
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csi_results
    • > Notice in wp-content/plugins/chill-survey-lite/classes/survey.php+43
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csi_results
    • > Notice in wp-content/plugins/chill-survey-lite/classes/survey.php+37
    Trying to get property 'start_text' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csi_results
    • > Notice in wp-content/plugins/chill-survey-lite/classes/survey.php+40
    Trying to get property 'final_text' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csi_results
    • > Notice in wp-content/plugins/chill-survey-lite/classes/survey.php+43
    Trying to get property 'restart_text' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csi_options
    • > Notice in wp-content/plugins/chill-survey-lite/classes/settings.php+116
    Undefined index: page_id
    • > GET request to /wp-admin/admin.php?page=csi_options
    • > Notice in wp-content/plugins/chill-survey-lite/classes/settings.php+45
    Undefined index: save_csi
    • > GET request to /wp-admin/admin.php?page=csi_feedback
    • > Notice in wp-content/plugins/chill-survey-lite/classes/settings.php+308
    Undefined index: csi_send_feedback
    • > GET request to /wp-admin/admin.php?page=csi_results
    • > Notice in wp-content/plugins/chill-survey-lite/classes/settings.php+247
    Undefined index: filtro_date_widget_csi

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'CsiSettings' not found in wp-content/plugins/chill-survey-lite/survey_template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/chill-survey-lite/csi.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=csi_questions
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=csi_questions - Refused to execute script from 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css?ver=5.8.1' because its MIME type ('text/css') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=csi_questions
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=csi_questions:207:36)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/admin.php?page=csi_questions
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=csi_options
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=csi_options - Refused to execute script from 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css?ver=5.8.1' because its MIME type ('text/css') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=csi_feedback
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=csi_feedback - Refused to execute script from 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css?ver=5.8.1' because its MIME type ('text/css') is not executable, and strict MIME type checking is enabled.
    • > GET request to /wp-admin/admin.php?page=csi_results
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=csi_results - Refused to execute script from 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css?ver=5.8.1' because its MIME type ('text/css') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: survey, review, interview, rate, csi...

chill-survey-lite/csi.php 85% from 13 tests

The primary PHP file in "Chill Survey Lite" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 215 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("chill-survey-lite.php" instead of "csi.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,953 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP52321744
CSS418350
PO File15172108
JavaScript48580

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity42.00
▷ Minimum class complexity8.00
▷ Maximum class complexity76.00
Average method complexity7.83
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 images were found in this plugin