84% wp-qa-quiz

Code Review | WP Q&A Quiz

WordPress plugin WP Q&A Quiz scored 84% from 54 tests.

About plugin

  • Plugin page: wp-qa-quiz
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: Apr 1, 2016
  • Number of updates: 9
  • Update frequency: every 0.9 days
  • Top authors: andreuka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.95ms] Passed 4 tests

Analyzing server-side resources used by WP Q&A Quiz
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.31 ▲4.20
Dashboard /wp-admin3.34 ▲0.0343.69 ▼0.62
Posts /wp-admin/edit.php3.39 ▲0.0345.64 ▼0.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.00 ▲4.32
Media Library /wp-admin/upload.php3.26 ▲0.0334.86 ▲0.76
Settings /wp-admin/edit.php?post_type=wp_qa_quiz&page=wp-qa-quiz-options3.2231.25
WP QA Quiz /wp-admin/edit.php?post_type=wp_qa_quiz3.3032.53
Add New /wp-admin/post-new.php?post_type=wp_qa_quiz3.3347.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Q&A Quiz
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.26 ▼1.104.68 ▲2.7939.42 ▼3.30
Dashboard /wp-admin2,237 ▲494.85 ▼0.02107.40 ▼8.0939.50 ▼9.28
Posts /wp-admin/edit.php2,123 ▲342.01 ▼0.0239.38 ▼1.7736.81 ▲0.47
Add New Post /wp-admin/post-new.php1,545 ▲2523.38 ▲0.46653.26 ▼27.3959.56 ▲1.97
Media Library /wp-admin/upload.php1,416 ▲344.27 ▲0.0693.42 ▼6.3644.09 ▲2.08
Settings /wp-admin/edit.php?post_type=wp_qa_quiz&page=wp-qa-quiz-options8132.0624.0124.96
WP QA Quiz /wp-admin/edit.php?post_type=wp_qa_quiz1,0842.0131.9929.35
Add New /wp-admin/post-new.php?post_type=wp_qa_quiz1,8433.6070.1935.66

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/wp-qa-quiz/front/templates/quiz-standart.php on line 15
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wp-qa-quiz/front/templates/quiz-standart.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-qa-quiz/front/templates/quiz-standart.php on line 2
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/wp-qa-quiz/front/templates/quiz-standart.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_permalink() in wp-content/plugins/wp-qa-quiz/front/templates/quiz-standart.php:22
    • > PHP Notice
      Trying to get property 'post_title' of non-object in wp-content/plugins/wp-qa-quiz/front/templates/quiz-standart.php on line 15
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/wp-qa-quiz/front/templates/quiz-standart.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-qa-quiz/wp-qa-quiz.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: question and answers, quizes, test, quizzes, questionaires...

wp-qa-quiz/wp-qa-quiz.php Passed 13 tests

The entry point to "WP Q&A Quiz" version 1.2 is a PHP file that has certain tags in its header comment area
69 characters long description:
Let you create question - answer quiz and insert them with shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,321 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31137568
CSS2331432
PHP46027244
HTML52077

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
front/images/next.png1.25KB0.25KB▼ 79.73%
admin/img/noimage.png2.38KB1.60KB▼ 33.01%
front/images/facebook-icon.png1.29KB0.58KB▼ 54.94%
front/images/repeat.png1.33KB0.73KB▼ 45.10%