84% web39-step-by-step-questionnaire

Code Review | Step-by-step Question Web39

WordPress plugin Step-by-step Question Web39 scored84%from 54 tests.

About plugin

  • Plugin page: web39-step-by-ste...
  • Plugin version: 0.9.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Jun 30, 2022
  • Latest release: Sep 6, 2022
  • Number of updates: 5
  • Update frequency: every 13.6 days
  • Top authors: web39 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Step-by-step Question Web39
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.17 ▼1.22
Dashboard /wp-admin3.31 ▲0.0044.63 ▼3.14
Posts /wp-admin/edit.php3.36 ▲0.0051.51 ▲3.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.92 ▼0.96
Media Library /wp-admin/upload.php3.23 ▲0.0033.49 ▼0.30

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Step-by-step Question Web39
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.081.68 ▼0.0041.33 ▲1.65
Dashboard /wp-admin2,206 ▲175.82 ▲0.8496.35 ▼9.5840.13 ▼1.32
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0039.45 ▼0.5534.26 ▲0.15
Add New Post /wp-admin/post-new.php1,536 ▼623.21 ▲5.12638.77 ▼6.8457.10 ▲0.52
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.1497.84 ▲1.7042.24 ▼0.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 40× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'W39SQ_PLUGIN_DIR/classes/W39SQQuestion.php' (include_path='.:/usr/share/php') in wp-content/plugins/web39-step-by-step-questionnaire/classes/W39SQQuestions.php on line 3
    • > PHP Warning
      require_once(W39SQ_PLUGIN_DIR/classes/W39SQLoadShort.php): failed to open stream: No such file or directory in wp-content/plugins/web39-step-by-step-questionnaire/includes/controller.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'W39SQ_PLUGIN_DIR/classes/W39SQ.php' (include_path='.:/usr/share/php') in wp-content/plugins/web39-step-by-step-questionnaire/admin/includes/W39SQTableList.php on line 2
    • > PHP Warning
      Use of undefined constant W39SQ_PLUGIN_DIR - assumed 'W39SQ_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/web39-step-by-step-questionnaire/classes/W39SQQuestions.php on line 3
    • > PHP Warning
      require_once(W39SQ_PLUGIN_DIR/classes/W39SQ.php): failed to open stream: No such file or directory in wp-content/plugins/web39-step-by-step-questionnaire/admin/includes/W39SQTableList.php on line 2
    • > PHP Warning
      Use of undefined constant W39SQ_PLUGIN_DIR - assumed 'W39SQ_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/web39-step-by-step-questionnaire/includes/controller.php on line 3
    • > PHP Warning
      require_once(W39SQ_PLUGIN_DIR/classes/W39SQ.php): failed to open stream: No such file or directory in wp-content/plugins/web39-step-by-step-questionnaire/classes/W39SQRepository.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'W39SQ_PLUGIN_DIR/classes/W39SQAdmin.php' (include_path='.:/usr/share/php') in wp-content/plugins/web39-step-by-step-questionnaire/classes/W39SQLastAnswer.php on line 4
    • > PHP Warning
      Use of undefined constant W39SQ_PLUGIN_DIR - assumed 'W39SQ_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/web39-step-by-step-questionnaire/classes/W39SQRepository.php on line 4
    • > PHP Warning
      Use of undefined constant W39SQ_PLUGIN_DIR - assumed 'W39SQ_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/web39-step-by-step-questionnaire/admin/includes/W39SQTableList.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Вариант слайда с выбором единственного ответа.), #2 (Вариант слайда со множественным выбором ответов (стоимость суммируется)), #3 (Последний этап (слайд) с контактными данными клиентами и кнопкой отправки), #4 (Сообщение о том, что заявка клиента выполнена успешно)
The official readme.txt might help

web39-step-by-step-questionnaire/index.php 92% from 13 tests

The main file in "Step-by-step Question Web39" v. 0.9.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("web39-step-by-step-questionnaire.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,694 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP203274532,474
JavaScript44138543
CSS24460433
PO File299111244

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.18
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods108
▷ Static methods2825.93%
▷ Public methods7367.59%
▷ Protected methods2018.52%
▷ Private methods1513.89%
Functions20
▷ Named functions1785.00%
▷ Anonymous functions315.00%
Constants48
▷ Global constants612.50%
▷ Class constants4287.50%
▷ Public constants4095.24%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
w39sq.png117.58KB53.02KB▼ 54.90%