79% qnotsquiz

Code Review | qnotsquiz

WordPress plugin qnotsquiz scored79%from 54 tests.

About plugin

  • Plugin page: qnotsquiz
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 19, 2018
  • Latest release: Sep 6, 2018
  • Number of updates: 6
  • Update frequency: every 3.3 days
  • Top authors: muniyandibg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /664 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.13MB] [CPU: ▼18.23ms] Passed 4 tests

This is a short check of server-side resources used by qnotsquiz
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5435.18 ▼4.43
Dashboard /wp-admin3.88 ▲0.5345.74 ▼13.18
Posts /wp-admin/edit.php3.93 ▲0.5747.14 ▼1.08
Add New Post /wp-admin/post-new.php3.70 ▼2.1936.22 ▼54.24
Media Library /wp-admin/upload.php3.81 ▲0.5836.14 ▲1.09
General /wp-admin/admin.php?page=qnotsquiz3.7031.97
Export /wp-admin/edit.php?post_type=acf&page=acf-export3.7131.22
Quizzes /wp-admin/edit.php?post_type=quiz3.8440.94
Add-ons /wp-admin/edit.php?post_type=acf&page=acf-addons3.7132.13
Questions /wp-admin/edit.php?post_type=questions3.8436.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for qnotsquiz
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲20614.61 ▲0.2315.71 ▲14.2344.20 ▲3.82
Dashboard /wp-admin2,243 ▲555.85 ▲0.0497.52 ▼8.0637.55 ▼3.94
Posts /wp-admin/edit.php2,123 ▲341.99 ▼0.0742.14 ▲3.5734.22 ▼3.15
Add New Post /wp-admin/post-new.php6,704 ▲5,19024.82 ▲1.28968.10 ▲295.0640.10 ▼13.76
Media Library /wp-admin/upload.php1,425 ▲374.20 ▼0.0296.96 ▼2.2644.53 ▼2.29
General /wp-admin/admin.php?page=qnotsquiz8072.0627.0627.26
Export /wp-admin/edit.php?post_type=acf&page=acf-export9592.0224.6629.17
Quizzes /wp-admin/edit.php?post_type=quiz1,0952.0229.8431.59
Add-ons /wp-admin/edit.php?post_type=acf&page=acf-addons1,0302.3425.9726.90
Questions /wp-admin/edit.php?post_type=questions1,0871.9829.3428.05

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/qnotsquiz/qnotsquiz_settings.php
  • 40× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/qnotsquiz/acf/core/api.php:866
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/qnotsquiz/acf/core/fields/_functions.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/qnotsquiz/acf/core/fields/wysiwyg.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/qnotsquiz/acf/core/fields/radio.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/qnotsquiz/acf/core/fields/color_picker.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/qnotsquiz/acf/core/fields/email.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/qnotsquiz/acf/core/views/meta_box_location.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/qnotsquiz/acf/core/fields/post_object.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/qnotsquiz/acf/core/fields/checkbox.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/qnotsquiz/acf/core/fields/number.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: quizmaker, quiz

qnotsquiz/qnotsquiz.php Passed 13 tests

This is the main PHP file of "qnotsquiz" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
33 characters long description:
Create quiz with easy navigation.

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
There were no executable files found in this plugin38,268 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PO File249,70114,11221,302
PHP474,1754,7119,859
JavaScript72,2391,6314,519
CSS67483792,588

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.44
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes39
▷ Abstract classes00.00%
▷ Concrete classes39100.00%
▷ Final classes00.00%
Methods278
▷ Static methods00.00%
▷ Public methods278100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions73
▷ Named functions6183.56%
▷ Anonymous functions1216.44%
Constants1
▷ Global constants1100.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
17 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
acf/images/arrows@2x.png0.84KB0.88KB0.00%
acf/core/fields/date_picker/images/ui-bg_highlight-soft_0_444444_1x100.png0.08KB0.08KB0.00%
acf/images/sprite.png5.94KB2.82KB▼ 52.51%
acf/core/fields/date_picker/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
acf/core/fields/date_picker/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%