68% quizu

Code Review | QuizU Branched

WordPress plugin QuizU Branched scored68%from 54 tests.

About plugin

  • Plugin page: quizu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 15, 2017
  • Latest release: Aug 15, 2017
  • Number of updates: 19
  • Update frequency: every 1.3 days
  • Top authors: jbentcano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,060 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼12.34ms] Passed 4 tests

Server-side resources used by QuizU Branched
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2546.29 ▲0.79
Dashboard /wp-admin3.70 ▲0.3655.13 ▼8.42
Posts /wp-admin/edit.php3.75 ▲0.4063.28 ▲11.17
Add New Post /wp-admin/post-new.php6.22 ▲0.3490.57 ▼47.08
Media Library /wp-admin/upload.php3.53 ▲0.3039.87 ▲5.36

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 30 new options
New WordPress options
quizu_settings_social_sharing_flag
can_compress_scripts
quizu_settings_autosave_quiz_flag
quizu_settings_texts_total_score
theysaidso_admin_options
quizu_settings_texts_send
quizu_settings_email_subject
widget_theysaidso_widget
quizu_settings_defaults_stored
quizu_settings_texts_reset
...

Browser metrics Passed 4 tests

Checking browser requirements for QuizU Branched
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,105 ▲34415.51 ▲1.378.20 ▲6.6345.35 ▲0.17
Dashboard /wp-admin2,391 ▲2176.35 ▲0.75110.33 ▲1.0741.32 ▼1.83
Posts /wp-admin/edit.php2,323 ▲2203.53 ▲1.5057.01 ▲15.1934.05 ▼7.20
Add New Post /wp-admin/post-new.php6,460 ▲4,93227.69 ▲4.73877.56 ▲261.0838.37 ▼12.91
Media Library /wp-admin/upload.php1,462 ▲624.33 ▲0.1986.65 ▼20.9545.94 ▼1.09

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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/quizu/uninstall.php+30
    Undefined variable: quizu_master_config_list
  • Zombie WordPress options detected upon uninstall: 27 options
    • quizu_settings_texts_email_error
    • widget_quizu_widget
    • quizu_settings_texts_minimal
    • quizu_settings_texts_post_email
    • quizu_settings_texts_error
    • db_upgraded
    • quizu_settings_texts_next
    • quizu_settings_email_subject
    • quizu_settings_email_name
    • quizu_settings_texts_essay_error
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please take a closer look at the following
  • 17× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/quizu/includes/basic_email.php
    • > /wp-content/plugins/quizu/views/path.php
    • > /wp-content/plugins/quizu/quizu_init.php
    • > /wp-content/plugins/quizu/views/settings.php
    • > /wp-content/plugins/quizu/models/quizu_main_model.php
    • > /wp-content/plugins/quizu/quizu_setup.php
    • > /wp-content/plugins/quizu/controllers/quizu_front_ajax_controller.php
    • > /wp-content/plugins/quizu/views/question.php
    • > /wp-content/plugins/quizu/views/admin.php
    • > /wp-content/plugins/quizu/models/quizu_admin_ajax_model.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/user.php): failed to open stream: No such file or directory in wp-content/plugins/quizu/quizu_utils.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/quizu/includes/basic_email.php on line 303
    • > PHP Notice
      Undefined variable: scores in wp-content/plugins/quizu/includes/basic_email.php on line 303
    • > PHP Notice
      Undefined variable: subject in wp-content/plugins/quizu/includes/basic_email.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/quizu/quizu_utils.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/user.php' (include_path='.:/usr/share/php') in wp-content/plugins/quizu/quizu_utils.php on line 4
    • > PHP Notice
      Undefined variable: subject in wp-content/plugins/quizu/includes/basic_email.php on line 285
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/quizu/includes/basic_email.php on line 303

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

quizu/quizu_init.php 85% from 13 tests

The main PHP script in "QuizU Branched" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("quizu.php" instead of "quizu_init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,124 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP198071892,151
CSS260746
PO File19497225
JavaScript2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity10.25
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected