84% wp-quizr

Code Review | WP Quizr

WordPress plugin WP Quizr scored84%from 54 tests.

About plugin

  • Plugin page: wp-quizr
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Jul 8, 2018
  • Number of updates: 43
  • Update frequency: every 24.2 days
  • Top authors: amir_canteetu (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /3,754 total downloads

Benchmarks

Plugin footprint 83% 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.16MB] [CPU: ▼10.88ms] Passed 4 tests

An overview of server-side resources used by WP Quizr
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1529.50 ▼16.11
Dashboard /wp-admin3.49 ▲0.1452.99 ▼12.36
Posts /wp-admin/edit.php3.60 ▲0.2451.91 ▲0.01
Add New Post /wp-admin/post-new.php6.07 ▲0.1893.46 ▼15.06
Media Library /wp-admin/upload.php3.41 ▲0.1840.02 ▲3.21
All Quizzes /wp-admin/edit.php?post_type=wp_quizr3.4846.08
WP Quizr Settings /wp-admin/edit.php?post_type=wp_quizr&page=wp_quizr_settings_menu3.3834.85
Add New /wp-admin/post-new.php?post_type=wp_quizr3.4848.17

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 1,393 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
wp_quizr_options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

WP Quizr: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.72 ▲0.081.67 ▼0.1440.86 ▲0.54
Dashboard /wp-admin2,229 ▲555.62 ▼0.0283.83 ▼15.0539.19 ▼4.00
Posts /wp-admin/edit.php2,131 ▲282.04 ▲0.0439.28 ▼3.3936.42 ▲0.39
Add New Post /wp-admin/post-new.php1,552 ▲2623.08 ▲0.17621.64 ▼25.3748.13 ▼2.49
Media Library /wp-admin/upload.php1,431 ▲344.24 ▲0.0599.34 ▼5.1745.12 ▲0.24
All Quizzes /wp-admin/edit.php?post_type=wp_quizr1,2804.9058.3328.00
WP Quizr Settings /wp-admin/edit.php?post_type=wp_quizr&page=wp_quizr_settings_menu9222.0023.1628.12
Add New /wp-admin/post-new.php?post_type=wp_quizr1,7875.6674.1233.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-quizr/admin/partials/wp-quizr-display-social-ids-reminder.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-quizr/admin/partials/wp_quizr_display_outcomes_meta_box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-quizr/admin/partials/wp_quizr_display_question_titles_meta_box.php:5
    • > PHP Notice
      Undefined variable: box in wp-content/plugins/wp-quizr/admin/partials/wp_quizr_display_outcomes_meta_box.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-quizr/admin/partials/wp_quizr_display_outcomes_meta_box.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-quizr/public/partials/wp_quizr_add_meta_tags.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-quizr/admin/partials/wp_quizr_display_outcomes_meta_box.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-quizr/admin/partials/wp-quizr-display-settings-page.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-quizr/admin/partials/wp_quizr_display_shortcode_meta_box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-quizr/admin/partials/wp_quizr_display_outcomes_titles_meta_box.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: buzzfeed quiz, viral quiz, quiz, viral, quizzes

wp-quizr/wp-quizr.php 92% from 13 tests

Analyzing the main PHP file in "WP Quizr" version 2.0.0
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains

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 detected78,961 lines of code in 1,353 files:
LanguageFilesBlank linesComment linesLines of code
JSON20039,825
YAML40015,153
SVG1,26705,02410,790
CSS14674614,158
Sass18504344,064
LESS17502394,037
PHP19591561751
JavaScript127838183

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods44
▷ Static methods511.36%
▷ Public methods3988.64%
▷ Protected methods00.00%
▷ Private methods511.36%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 1.33MB with 0.78MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png203.92KB73.87KB▼ 63.77%
assets/screenshot-4.png445.13KB148.97KB▼ 66.53%
public/images/unchecked.png0.29KB0.20KB▼ 32.56%
assets/screenshot-3.png538.02KB179.88KB▼ 66.57%
assets/screenshot-2.png171.71KB61.17KB▼ 64.38%