68% svs-quiz-survey-contact

Code Review | SVS Quiz & Survey & Contact

WordPress plugin SVS Quiz & Survey & Contact scored68%from 54 tests.

About plugin

  • Plugin page: svs-quiz-survey-c...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2015
  • Latest release: Sep 28, 2015
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: svs-websoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,720 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.89ms] Passed 4 tests

Analyzing server-side resources used by SVS Quiz & Survey & Contact
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.21 ▲1.55
Dashboard /wp-admin3.38 ▲0.0349.37 ▼16.16
Posts /wp-admin/edit.php3.49 ▲0.1346.20 ▼3.25
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.46 ▼13.71
Media Library /wp-admin/upload.php3.30 ▲0.0739.79 ▲1.93
Submissions /wp-admin/admin.php?page=svs_quiz_submissions3.2736.57
Forms /wp-admin/admin.php?page=svs_quiz3.2731.21

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 51 new files
Database: 2 new tables, 6 new options
New tables
wp_svs_quiz
wp_svs_quiz_form_submit
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for SVS Quiz & Survey & Contact
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲15313.55 ▼0.827.55 ▲5.9038.09 ▼2.75
Dashboard /wp-admin2,216 ▲455.51 ▼0.1487.10 ▼2.6840.69 ▲1.99
Posts /wp-admin/edit.php2,127 ▲271.98 ▼0.0134.06 ▲0.1535.88 ▼1.15
Add New Post /wp-admin/post-new.php1,548 ▲2023.15 ▲0.25667.66 ▼2.9659.13 ▲8.99
Media Library /wp-admin/upload.php1,427 ▲334.17 ▼0.1494.54 ▼16.2743.99 ▼4.20
Submissions /wp-admin/admin.php?page=svs_quiz_submissions8441.8431.1224.10
Forms /wp-admin/admin.php?page=svs_quiz8671.8428.3830.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 failed, leaving 2 tables in the database
    • wp_svs_quiz_form_submit
    • wp_svs_quiz
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/svs-quiz-survey-contact/svsquiz.php
    • > /wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_footer.php
    • > /wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_submissions_details.php
    • > /wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_submissions.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_form.php:10
    • > PHP Notice
      Undefined index: User Information in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_submissions_details.php on line 3
    • > PHP Notice
      Undefined index: Name in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_submissions_details.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_submissions_details.php on line 51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_header.php:4
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_form.php on line 4
    • > PHP Warning
      Use of undefined constant SVS_QUIZ_IMG_DIR - assumed 'SVS_QUIZ_IMG_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_header.php on line 3
    • > PHP Notice
      Undefined index: Phone in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_submissions_details.php on line 11
    • > PHP Notice
      Undefined index: Email in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_submissions_details.php on line 10
    • > PHP Notice
      Undefined index: Form in wp-content/plugins/svs-quiz-survey-contact/app/view/svs_quiz_submissions_details.php on line 7

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: test creator, contact, quiz, form creator, form builder...

svs-quiz-survey-contact/svsquiz.php 85% from 13 tests

"SVS Quiz & Survey & Contact" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 274 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("svs-quiz-survey-contact.php" instead of "svsquiz.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin6,996 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
CSS4100292,330
Sass1326241,352
LESS1326331,343
JavaScript217038828
PHP99232578
SVG100565

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity20.00
▷ Minimum class complexity8.00
▷ Maximum class complexity32.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2592.59%
▷ Protected methods00.00%
▷ Private methods27.41%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/img/svs_logo.png8.35KB4.70KB▼ 43.72%