84% quizmeister

Code Review | QuizMeister

WordPress plugin QuizMeister scored84%from 54 tests.

About plugin

  • Plugin page: quizmeister
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2016
  • Latest release: Nov 24, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: dessimat0r (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /667 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼9.36ms] Passed 4 tests

An overview of server-side resources used by QuizMeister
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.74 ▼4.10
Dashboard /wp-admin3.45 ▲0.1147.41 ▼10.58
Posts /wp-admin/edit.php3.49 ▲0.1451.37 ▲7.17
Add New Post /wp-admin/post-new.php6.15 ▲0.2683.56 ▼24.81
Media Library /wp-admin/upload.php3.40 ▲0.1835.89 ▲2.04
All Quizzes /wp-admin/edit.php?post_type=quiz3.4038.56
Add New /wp-admin/post-new.php?post_type=quiz3.5745.46

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for QuizMeister
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲20714.00 ▼0.3814.26 ▲12.5140.57 ▼1.13
Dashboard /wp-admin2,251 ▲634.86 ▼0.06107.42 ▼8.1541.97 ▼0.84
Posts /wp-admin/edit.php2,134 ▲452.04 ▲0.0439.32 ▲0.9734.35 ▲2.63
Add New Post /wp-admin/post-new.php1,575 ▲5618.16 ▼5.07600.61 ▼85.1650.72 ▼21.52
Media Library /wp-admin/upload.php1,433 ▲514.25 ▲0.0795.82 ▼3.1841.42 ▼1.79
All Quizzes /wp-admin/edit.php?post_type=quiz1,1032.0130.0128.96
Add New /wp-admin/post-new.php?post_type=quiz2,2507.63174.2873.75

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
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quizmeister/qm-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quizmeister/templates/single-quiz.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quizmeister/qm-ajax.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/quizmeister/qm-new-quiz.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quizmeister/qm-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quizmeister/admin/settings.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === quizmeister === )
The official readme.txt is a good inspiration

quizmeister/qm.php 92% from 13 tests

This is the main PHP file of "QuizMeister" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("quizmeister.php" instead of "qm.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
Success! There were no dangerous files found in this plugin2,959 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP82102531,754
JavaScript24533673
CSS38916477
Markdown132055

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.43
Average class complexity34.33
▷ Minimum class complexity7.00
▷ Maximum class complexity104.00
Average method complexity5.26
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods41
▷ Static methods12.44%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions2696.30%
▷ Anonymous functions13.70%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.18MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/twitter.png0.72KB0.75KB0.00%
images/arrow-right.png0.50KB0.46KB▼ 7.10%
templates/screenshot.png177.96KB60.51KB▼ 66.00%
images/facebook.png0.59KB0.62KB0.00%
templates/images/fb.png1.20KB1.03KB▼ 14.15%