84% classic-quiz-feedback-survey

Code Review | Classic Quiz Feedback Survey

WordPress plugin Classic Quiz Feedback Survey scored84%from 54 tests.

About plugin

  • Plugin page: classic-quiz-feed...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2
  • WordPress version: 6.3.1
  • First release: Sep 1, 2020
  • Latest release: May 11, 2023
  • Number of updates: 9
  • Update frequency: every 109.1 days
  • Top authors: amitbiswas06 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▼1.68ms] Passed 4 tests

Analyzing server-side resources used by Classic Quiz Feedback Survey
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.17 ▲0.7046.68 ▲3.94
Dashboard /wp-admin4.13 ▲0.8252.06 ▼1.44
Posts /wp-admin/edit.php4.18 ▲0.8254.63 ▼2.92
Add New Post /wp-admin/post-new.php6.91 ▲1.0392.34 ▼6.31
Media Library /wp-admin/upload.php3.98 ▲0.7545.08 ▲9.61
Entries /wp-admin/edit.php?post_type=cqfs_entry4.0345.12
Add Build /wp-admin/post-new.php?post_type=cqfs_build4.0454.56
Questions /wp-admin/edit.php?post_type=cqfs_question4.0446.78
Build /wp-admin/edit.php?post_type=cqfs_build4.0441.60
Add Entry /wp-admin/post-new.php?post_type=cqfs_entry4.0350.68
Add Question /wp-admin/post-new.php?post_type=cqfs_question4.1457.11

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Classic Quiz Feedback Survey
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲10813.57 ▼0.812.56 ▲0.7542.64 ▲1.66
Dashboard /wp-admin2,269 ▲815.87 ▲0.98107.83 ▼10.8844.35 ▼0.88
Posts /wp-admin/edit.php2,152 ▲632.04 ▲0.0540.07 ▲2.7735.81 ▲1.81
Add New Post /wp-admin/post-new.php1,576 ▲4218.41 ▼4.90646.57 ▼26.7169.59 ▲5.49
Media Library /wp-admin/upload.php1,445 ▲604.26 ▲0.0198.33 ▼3.0141.04 ▼4.93
Entries /wp-admin/edit.php?post_type=cqfs_entry1,1611.9832.2532.40
Add Build /wp-admin/post-new.php?post_type=cqfs_build1,9312.7252.0463.23
Questions /wp-admin/edit.php?post_type=cqfs_question1,1921.9932.2330.15
Build /wp-admin/edit.php?post_type=cqfs_build1,1821.9733.0230.65
Add Entry /wp-admin/post-new.php?post_type=cqfs_entry1,8282.7054.1479.41
Add Question /wp-admin/post-new.php?post_type=cqfs_question1,9513.7863.6233.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CQFS\\ADMIN\\FORMHANDLE\\is_admin() in wp-content/plugins/classic-quiz-feedback-survey/admin/form-handle.php:409
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CQFS\\ADMIN\\SCRIPTS\\add_action() in wp-content/plugins/classic-quiz-feedback-survey/admin/admin-scripts.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CQFS\\ADMIN\\METABOXES\\BUILD\\add_action() in wp-content/plugins/classic-quiz-feedback-survey/admin/meta-boxes/metabox-build.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CQFS\\ROOT\\plugin_dir_path() in wp-content/plugins/classic-quiz-feedback-survey/cqfs.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/classic-quiz-feedback-survey/cqfs-templates/template-results.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CQFS\\ADMIN\\MENUPAGES\\is_admin() in wp-content/plugins/classic-quiz-feedback-survey/admin/menu-pages.php:402
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CQFS\\ADMIN\\METABOXES\\ENTRY\\add_action() in wp-content/plugins/classic-quiz-feedback-survey/admin/meta-boxes/metabox-entry.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CQFS\\ADMIN\\METABOXES\\QUESTION\\add_action() in wp-content/plugins/classic-quiz-feedback-survey/admin/meta-boxes/metabox-question.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CQFS\\INC\\SUBMIT\\add_action() in wp-content/plugins/classic-quiz-feedback-survey/inc/submission.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: survey form, quiz, classic, quiz form, questionnaire...

classic-quiz-feedback-survey/cqfs.php 85% from 13 tests

The principal PHP file in "Classic Quiz Feedback Survey" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("classic-quiz-feedback-survey.php" instead of "cqfs.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected4,184 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP148268142,701
CSS211939793
JavaScript2268295657
Markdown126033

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.69
▷ Minimum class complexity4.00
▷ Maximum class complexity49.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods72
▷ Static methods1926.39%
▷ Public methods7097.22%
▷ Protected methods00.00%
▷ Private methods22.78%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants220.00%
▷ Class constants880.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin