78% quiz-cat

Code Review | Quiz Cat - WordPress Quiz Plugin

WordPress plugin Quiz Cat - WordPress Quiz Plugin scored78%from 54 tests.

About plugin

  • Plugin page: quiz-cat
  • Plugin version: 3.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2016
  • Latest release: Aug 31, 2023
  • Number of updates: 136
  • Update frequency: every 19.8 days
  • Top authors: fatcatapps (53.68%)davidhme (16.91%)RyanNovotny (15.44%)flippy101 (15.44%)Otto42 (1.47%)

Code review

54 tests

User reviews

32 reviews

Install metrics

5,000+ active /164,330 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.08ms] 75% from 4 tests

This is a short check of server-side resources used by Quiz Cat - WordPress Quiz Plugin
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 5,942.99ms on /wp-admin/edit.php?post_type=fca_qc_quiz&page=fca-featured-plugins)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.19 ▼0.17
Dashboard /wp-admin3.35 ▲0.0546.26 ▼0.12
Posts /wp-admin/edit.php3.40 ▲0.0545.71 ▼4.98
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.43 ▲6.43
Media Library /wp-admin/upload.php3.27 ▲0.0535.92 ▲0.94
Featured Plugins /wp-admin/edit.php?post_type=fca_qc_quiz&page=fca-featured-plugins3.805,942.99
All Quizzes /wp-admin/edit.php?post_type=fca_qc_quiz&page=fca-qc-list3.3835.30
Upgrade to Premium /wp-admin/edit.php?post_type=fca_qc_quiz&page=quiz-cat-upgrade3.0832.77
Add New /wp-admin/edit.php?post_type=fca_qc_quiz&page=fca-qc-new3.2432.30

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
fca_qc_show_review_notice
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Quiz Cat - WordPress Quiz Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.19 ▼1.391.69 ▼0.1042.12 ▼0.98
Dashboard /wp-admin2,249 ▲675.90 ▲0.0197.25 ▼7.9478.26 ▲38.19
Posts /wp-admin/edit.php2,132 ▲432.04 ▲0.0335.62 ▼4.5634.73 ▼0.48
Add New Post /wp-admin/post-new.php6,401 ▲4,88222.54 ▼0.92862.27 ▲182.0937.09 ▼22.92
Media Library /wp-admin/upload.php1,431 ▲404.24 ▲0.05103.45 ▲3.9476.34 ▲32.17
Featured Plugins /wp-admin/edit.php?post_type=fca_qc_quiz&page=fca-featured-plugins1,6033.5144.3152.13
All Quizzes /wp-admin/edit.php?post_type=fca_qc_quiz&page=fca-qc-list1,0481.7426.1827.32
Upgrade to Premium /wp-admin/edit.php?post_type=fca_qc_quiz&page=quiz-cat-upgrade1,5876.18326.21125.56
Add New /wp-admin/edit.php?post_type=fca_qc_quiz&page=fca-qc-new1,7182.3831.6935.48

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • fca_qc_show_review_notice
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/quiz-cat/quizcat.php
    • > /wp-content/plugins/quiz-cat/languages/index.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quiz-cat/includes/editor/editor.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/quiz-cat/includes/quiz/quiz.php:181
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quiz-cat/includes/block.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/quiz-cat/includes/list/post-list-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quiz-cat/includes/editor/sidebar.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quiz-cat/includes/notices/notices.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quiz-cat/includes/post-type.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (The start quiz / quiz landing - page), #2 (Each quiz contains multiple-choice questions), #3 (Answer page (correct answer)), #4 (Answer page (incorrect answer)), #5 (The quiz results / quiz scoring - page), #6 (The Quiz Cat user interface)
You can take inspiration from this readme.txt

quiz-cat/quizcat.php 92% from 13 tests

"Quiz Cat - WordPress Quiz Plugin" version 3.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("quiz-cat.php" instead of "quizcat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin5,201 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript175841741,945
PHP10434871,911
CSS11255231,345

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity5.86
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods342.86%
▷ Protected methods457.14%
▷ Private methods00.00%
Functions67
▷ Named functions67100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
13 PNG files occupy 0.26MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png3.89KB3.89KB0.03%
screenshot-1.png32.67KB34.19KB0.00%
assets/fatcatapps-logo-text.png16.24KB4.88KB▼ 69.97%
assets/personality.png27.32KB7.90KB▼ 71.09%
screenshot-5.png24.38KB25.31KB0.00%