72% rs-survey

Code Review | RS Survey

WordPress plugin RS Survey scored72%from 54 tests.

About plugin

  • Plugin page: rs-survey
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Aug 13, 2015
  • Latest release: Aug 13, 2015
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: richestsoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,120 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.06ms] Passed 4 tests

A check of server-side resources used by RS Survey
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.55 ▲2.43
Dashboard /wp-admin3.34 ▲0.0449.55 ▼1.05
Posts /wp-admin/edit.php3.39 ▲0.0445.74 ▼3.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.09 ▼5.83
Media Library /wp-admin/upload.php3.26 ▲0.0436.81 ▲4.95
Settings /wp-admin/admin.php?page=settings3.2332.77
Add Survey /wp-admin/admin.php?page=add-survey3.2331.67
RS Survey /wp-admin/admin.php?page=survey-settings3.2431.37

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for RS Survey
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17413.54 ▼1.0812.32 ▲10.5071.05 ▲24.26
Dashboard /wp-admin2,223 ▲455.56 ▼0.1580.90 ▼34.5839.64 ▼3.77
Posts /wp-admin/edit.php2,131 ▲311.96 ▼0.0436.34 ▼0.4033.63 ▼2.13
Add New Post /wp-admin/post-new.php1,560 ▲3417.99 ▼5.47628.36 ▼6.0570.45 ▲18.19
Media Library /wp-admin/upload.php1,428 ▲344.19 ▲0.0095.64 ▼1.5143.99 ▲2.76
Settings /wp-admin/admin.php?page=settings8282.0525.2226.14
Add Survey /wp-admin/admin.php?page=add-survey8252.0025.4228.06
RS Survey /wp-admin/admin.php?page=survey-settings8041.6925.9425.17

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=survey-settings
    • > Notice in wp-content/plugins/rs-survey/rs_settings.php+36
    Undefined index: paged
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=survey-settings
    • > Notice in wp-content/plugins/rs-survey/rs_settings.php+168
    Undefined index: action

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/rs-survey/take_survey.php
  • 26× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/rs-survey/survey.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-survey/quest.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-survey/results.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rs-survey/start.php:2
    • > PHP Notice
      Undefined variable: survey_q in wp-content/plugins/rs-survey/take_survey.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-survey/view_question.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_user_meta() in wp-content/plugins/rs-survey/settings.php:9
    • > PHP Warning
      sizeof(): Parameter must be an array or an object that implements Countable in wp-content/plugins/rs-survey/take_survey.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rs-survey/take_survey.php on line 12
    • > PHP Notice
      Undefined variable: survey_q in wp-content/plugins/rs-survey/take_survey.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

rs-survey/survey.php 92% from 13 tests

The entry point to "RS Survey" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rs-survey.php" instead of "survey.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
There were no executable files found in this plugin9,915 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS59237,059
JavaScript35771971,563
PHP17283331,005
SVG100288

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected