57% riddle-playful-content-on-the-go

Code Review | Riddle Quiz Maker - easily add quizzes with unlimited lead generation to your site

WordPress plugin Riddle Quiz Maker - easily add quizzes with unlimited lead generation to your site scored57%from 54 tests.

About plugin

  • Plugin page: riddle-playful-co...
  • Plugin version: 4.6.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 12, 2014
  • Latest release: Apr 19, 2023
  • Number of updates: 174
  • Update frequency: every 18.6 days
  • Top authors: riddleinc (45.98%)Moertenschlag (35.06%)philippmartini (20.11%)

Code review

54 tests

User reviews

8 reviews

Install metrics

400+ active /41,596 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▲0.57ms] Passed 4 tests

Analyzing server-side resources used by Riddle Quiz Maker - easily add quizzes with unlimited lead generation to your site
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.74 ▼1.61
Dashboard /wp-admin3.40 ▲0.0948.99 ▼0.78
Posts /wp-admin/edit.php3.52 ▲0.1653.39 ▲4.09
Add New Post /wp-admin/post-new.php5.98 ▲0.0995.01 ▲2.35
Media Library /wp-admin/upload.php3.32 ▲0.0939.03 ▲2.34
Connect account /wp-admin/admin.php?page=riddle-admin-menu3.4140.60
Help /wp-admin/admin.php?page=riddle-help3.3939.45

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 148 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
riddle_accessToken
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Riddle Quiz Maker - easily add quizzes with unlimited lead generation to your site
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.77 ▲0.382.25 ▲0.0243.08 ▲0.06
Dashboard /wp-admin2,235 ▲474.92 ▼0.99101.85 ▼6.2969.04 ▲22.56
Posts /wp-admin/edit.php2,118 ▲262.04 ▼0.0239.83 ▼1.2033.61 ▼7.13
Add New Post /wp-admin/post-new.php1,536 ▲323.22 ▲0.18735.60 ▲31.1052.66 ▲0.84
Media Library /wp-admin/upload.php1,402 ▲174.19 ▼0.02103.05 ▼0.4890.26 ▲43.93
Connect account /wp-admin/admin.php?page=riddle-admin-menu1,0143.3540.3388.95
Help /wp-admin/admin.php?page=riddle-help1,1893.3245.5474.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Error in wp-content/plugins/riddle-playful-content-on-the-go/riddle-plugin.php+45
    Uncaught Error: Call to a member function isAuthorized() on null in wp-content/plugins/riddle-playful-content-on-the-go/riddle-plugin.php:45
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): deactivatePlugin()
    #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/includes/plugin.php(816): do_action()
  • Uninstaller has failed for this plugin, leaving 148 files (2.23MB) in the plugin directory
    • (new file) lib/api-client/Service/ApiService.php
    • (new file) lib/api-client/Service/AccessToken.php
    • (new file) lib/api-client/Autoloader.php
    • (new file) lib/api-client/Exception/ApiException.php
    • (new file) lib/api-client/HTTPConnector.php
    • (new file) lib/api-client/Exception/ApiJSONParseException.php
    • (new file) lib/api-client/Response.php
    • (new file) lib/api-client/Service/Oauth.php
    • (new file) lib/api-client/Client.php
    • (new file) lib/api-client/Exception/ApiRequestException.php
    • ...
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • riddle_accessToken

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 9× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/riddle-playful-content-on-the-go/src/views/pages/my-riddles_riddle-cards.php
    • > /wp-content/plugins/riddle-playful-content-on-the-go/lib/leaderboard/app/views/landingpage-skipped.php
    • > /wp-content/plugins/riddle-playful-content-on-the-go/src/views/pages/my-riddles_shortcode-modal.php
    • > /wp-content/plugins/riddle-playful-content-on-the-go/src/views/components/navbar.php
    • > /wp-content/plugins/riddle-playful-content-on-the-go/src/views/leaderboard-views/landingpage-skipped.php
    • > /wp-content/plugins/riddle-playful-content-on-the-go/src/views/leaderboard-creator/pages/_creator-tutorial-modal.php
    • > /wp-content/plugins/riddle-playful-content-on-the-go/src/views/v2/riddle/_riddleItem.php
    • > /wp-content/plugins/riddle-playful-content-on-the-go/src/views/pages/my-riddles_team-selector.php
    • > /wp-content/plugins/riddle-playful-content-on-the-go/src/views/components/shortcode-modal.php
  • 99× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'src\\Api\\V1\\ApiConnector' not found in wp-content/plugins/riddle-playful-content-on-the-go/src/Api/V1/Api.php:5
    • > PHP Warning
      Use of undefined constant APP_DIR - assumed 'APP_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/riddle-playful-content-on-the-go/lib/leaderboard/src/Core/RiddleDefaultConfig.php on line 19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/riddle-playful-content-on-the-go/src/views/leaderboard-creator/pages/_creator-leaderboard-form.php on line 4
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/riddle-playful-content-on-the-go/src/views/pages/help.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/riddle-playful-content-on-the-go/lib/leaderboard/app/views/landingpage.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/riddle-playful-content-on-the-go/src/classes/UserSettings.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'src\\classes\\Controller' not found in wp-content/plugins/riddle-playful-content-on-the-go/src/controller/AdminController.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/riddle-playful-content-on-the-go/src/views/error-nokey-defined.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function renderShortcode() on null in wp-content/plugins/riddle-playful-content-on-the-go/lib/leaderboard/app/views/leaderboard-module.php:24
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/riddle-playful-content-on-the-go/src/views/v2/riddle/_riddleItem.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (23 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Connect your Riddle.com account with just a few clicks.), #2 (View your Riddle 1.0 & 2.0 content, switch between your personal account and your projects.), #3 (Grab a shortcode to place your Riddle.com content anywhere you like.), #4 (Use the Riddle Gutenberg Block to add a Riddle to your blog post or pages.), #5 (The Gutenberg Block can work with the shortcode, the Riddle ID and even with the published Riddle link.)
You can look at the official readme.txt

riddle-playful-content-on-the-go/riddle-plugin.php 85% from 13 tests

"Riddle Quiz Maker - easily add quizzes with unlimited lead generation to your site" version 4.6.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 182 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("riddle-playful-content-on-the-go.php" instead of "riddle-plugin.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 plugin18,042 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,319169,567
PHP1071,3286274,939
JavaScript59043463,536

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.66
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces20
Interfaces1
Traits0
Classes66
▷ Abstract classes46.06%
▷ Concrete classes6293.94%
▷ Final classes00.00%
Methods411
▷ Static methods7718.73%
▷ Public methods31676.89%
▷ Protected methods297.06%
▷ Private methods6616.06%
Functions12
▷ Named functions758.33%
▷ Anonymous functions541.67%
Constants37
▷ Global constants1745.95%
▷ Class constants2054.05%
▷ Public constants20100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.87MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/icon-white-tiny.png1.64KB0.55KB▼ 66.55%
public/images/riddle-wp-icon-16x16.png14.91KB0.52KB▼ 96.50%
screenshot-4.png32.24KB9.19KB▼ 71.48%
public/images/icons/ic-info-outline.png0.61KB0.32KB▼ 48.17%
public/images/icons/ic-add.png0.24KB0.16KB▼ 34.02%