10% quest

Code Review | WordPress Quest

WordPress plugin WordPress Quest scored 10% from 54 tests.

About plugin

  • Plugin page: quest
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Jan 20, 2013
  • Latest release: Nov 30, 2013
  • Number of updates: 7
  • Update frequency: every 44.9 days
  • Top authors: Newnab (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,773 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function register_widget_control is deprecated since version 2.8.0! Use wp_register_widget_control() instead.

Server metrics [RAM: ▼1.71MB] [CPU: ▼51.65ms] Passed 4 tests

A check of server-side resources used by WordPress Quest
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.195.58 ▼43.75
Dashboard /wp-admin2.30 ▼1.0112.04 ▼39.64
Posts /wp-admin/edit.php2.30 ▼1.067.45 ▼36.82
Add New Post /wp-admin/post-new.php2.30 ▼3.596.60 ▼86.37
Media Library /wp-admin/upload.php2.30 ▼0.936.06 ▼26.59
Settings /wp-admin/admin.php?page=wp-quest-settings2.307.50
Analytics /wp-admin/admin.php?page=wp-quest-analytics2.306.80
Quests /wp-admin/admin.php?page=wp-quest-quests2.307.27
Rules /wp-admin/admin.php?page=wp-quest2.306.46
Levels /wp-admin/admin.php?page=wp-quest-levels2.307.50

Server storage [IO: ▲0.04MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: 6 new tables, 8 new options
New tables
wp_wp_quest_levels
wp_wp_quest_user_levels
wp_wp_quest_user_quests
wp_wp_quest_rules
wp_wp_quest_user_rules
wp_wp_quest_quests
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
wp_quest_db_version
recovery_mode_email_last_sent
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Quest
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲18913.67 ▼0.7112.40 ▲10.3842.66 ▼4.33
Dashboard /wp-admin2,231 ▲435.84 ▲0.92110.92 ▼3.4177.40 ▲33.35
Posts /wp-admin/edit.php2,132 ▲432.01 ▼0.0335.50 ▼1.0833.16 ▼0.67
Add New Post /wp-admin/post-new.php1,547 ▲1117.58 ▼5.52740.23 ▲143.5456.39 ▲5.36
Media Library /wp-admin/upload.php1,427 ▲424.19 ▲0.0098.13 ▼6.6964.52 ▲17.37
Settings /wp-admin/admin.php?page=wp-quest-settings8722.0224.2026.97
Analytics /wp-admin/admin.php?page=wp-quest-analytics8102.0224.1926.54
Quests /wp-admin/admin.php?page=wp-quest-quests7131.536.8921.50
Rules /wp-admin/admin.php?page=wp-quest7131.536.5015.71
Levels /wp-admin/admin.php?page=wp-quest-levels7131.656.4417.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function register_widget_control is deprecated since version 2.8.0! Use wp_register_widget_control() instead.
  • The uninstall procedure failed, leaving 6 tables in the database
    • wp_wp_quest_rules
    • wp_wp_quest_user_quests
    • wp_wp_quest_user_rules
    • wp_wp_quest_user_levels
    • wp_wp_quest_quests
    • wp_wp_quest_levels
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • db_upgraded
    • wp_quest_db_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > User deprecated in wp-includes/functions.php+5453
    Function register_widget_control is deprecated since version 2.8.0! Use wp_register_widget_control() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Warning in wp-content/plugins/quest/wp-quest.php+134
    Use of undefined constant wp_quest_top_level_redirect - assumed 'wp_quest_top_level_redirect' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Warning in wp-content/plugins/quest/wp-quest.php+137
    Use of undefined constant wp_quest_rules - assumed 'wp_quest_rules' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Warning in wp-content/plugins/quest/wp-quest.php+139
    Use of undefined constant wp_quest_quests - assumed 'wp_quest_quests' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Warning in wp-content/plugins/quest/wp-quest.php+141
    Use of undefined constant wp_quest_levels - assumed 'wp_quest_levels' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Warning in wp-content/plugins/quest/wp-quest.php+143
    Use of undefined constant wp_quest_settings - assumed 'wp_quest_settings' (this will throw an Error in a future version of PHP)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Warning in wp-content/plugins/quest/wp-quest.php+145
    Use of undefined constant wp_quest_analytics - assumed 'wp_quest_analytics' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Notice in wp-content/plugins/quest/wp-quest.php+445
    Undefined index: submit
    • > GET request to /wp-admin/admin.php?page=wp-quest-quests
    • > Error in wp-content/plugins/quest/wp-quest.php+358
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/quest/wp-quest.php:358
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): wp_quest_quests()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=wp-quest
    • > Error in wp-content/plugins/quest/wp-quest.php+214
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/quest/wp-quest.php:214
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): wp_quest_rules()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Error in wp-content/plugins/quest/wp-quest.php+474
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/quest/wp-quest.php:474
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): wp_quest_levels()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/quest/wp-quest.php:130

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-quest-levels
    • > Network (severe)
    wp-content/plugins/wp-quest/images/icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
6 plugin tags: rules, gamification, quests, missions, points...

quest/wp-quest.php 85% from 13 tests

The main PHP file in "WordPress Quest" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("quest.php" instead of "wp-quest.php")
  • Description: The description should be shorter than 140 characters (currently 183 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected889 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2114131817
JavaScript120653
CSS13216
Markdown1103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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