66% quizess

Code Review | Quizess

WordPress plugin Quizess scored66%from 54 tests.

About plugin

  • Plugin page: quizess
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.2.3
  • WordPress version: 6.3.1
  • First release: Apr 3, 2019
  • Latest release: Sep 15, 2019
  • Number of updates: 22
  • Update frequency: every 7.9 days
  • Top authors: Tihi321 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,287 total downloads

Benchmarks

Plugin footprint 82% 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.43MB] [CPU: ▼9.04ms] Passed 4 tests

An overview of server-side resources used by Quizess
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.61 ▲1.1447.14 ▲4.90
Dashboard /wp-admin4.43 ▲1.1256.81 ▲4.85
Posts /wp-admin/edit.php4.48 ▲1.1260.44 ▲9.29
Add New Post /wp-admin/post-new.php4.24 ▼1.6547.64 ▼53.25
Media Library /wp-admin/upload.php4.35 ▲1.1246.59 ▲7.36
All Questions /wp-admin/edit.php?post_type=question4.3944.80
Add New Question /wp-admin/post-new.php?post_type=question4.2442.26
Quiz Topics /wp-admin/edit-tags.php?taxonomy=quiz-topic&post_type=quiz4.3443.62
Add New Quiz /wp-admin/post-new.php?post_type=quiz4.2442.74
Dashboard /wp-admin/admin.php?page=quizess_dashboard4.3751.98
Question Topics /wp-admin/edit-tags.php?taxonomy=question-topic&post_type=question4.3441.26
All Quizess /wp-admin/edit.php?post_type=quiz4.3944.08

Server storage [IO: ▲10.55MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 3 files (0.00KB) outside of "wp-content/plugins/quizess/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/quizess/assets/banner-772\303\227250.png"
    • (new file) "wp-content/plugins/quizess/assets/banner-1544\303\227500.png"
    • (new file) "wp-content/plugins/quizess/assets/icon-128\303\227128.png"
Filesystem: 569 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Quizess
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.24 ▼0.111.69 ▼0.0641.39 ▼2.35
Dashboard /wp-admin2,241 ▲645.67 ▲0.1091.32 ▼4.2343.25 ▼0.11
Posts /wp-admin/edit.php2,143 ▲431.96 ▼0.0340.87 ▲3.6739.57 ▲2.37
Add New Post /wp-admin/post-new.php1,569 ▲4323.35 ▲0.12666.11 ▼1.2159.77 ▲6.60
Media Library /wp-admin/upload.php1,440 ▲464.17 ▲0.0599.92 ▼2.5145.15 ▲1.77
All Questions /wp-admin/edit.php?post_type=question1,1071.9331.8232.95
Add New Question /wp-admin/post-new.php?post_type=question6,23122.34974.9052.23
Quiz Topics /wp-admin/edit-tags.php?taxonomy=quiz-topic&post_type=quiz1,3172.1226.5233.34
Add New Quiz /wp-admin/post-new.php?post_type=quiz6,27220.75867.7168.36
Dashboard /wp-admin/admin.php?page=quizess_dashboard1,21719.87271.2963.17
Question Topics /wp-admin/edit-tags.php?taxonomy=question-topic&post_type=question1,3142.1227.2030.61
All Quizess /wp-admin/edit.php?post_type=quiz1,1071.9430.6731.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=quiz
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for quizess/v1/dashboard-options is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=quiz
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for quizess/v1/menus is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=quiz
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for quizess/v1/quizes/(?P\d+) is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=quiz
    • > User deprecated in wp-includes/functions.php+5828
    Hook block_categories is deprecated since version 5.8.0! Use block_categories_all instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=quiz
    • > User deprecated in wp-includes/functions.php+5828
    Hook allowed_block_types is deprecated since version 5.8.0! Use allowed_block_types_all instead.

SRP 0% 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
The following issues need your attention
  • 7× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/quizess/vendor/infinum/coding-standards-wp/autoload.php
    • > /wp-content/plugins/quizess/src/languages/index.php
    • > /wp-content/plugins/quizess/views/svg/menu-icon.php
    • > /wp-content/plugins/quizess/views/admin/dashboard.php
    • > /wp-content/plugins/quizess/src/front/index.php
    • > /wp-content/plugins/quizess/src/rest/index.php
    • > /wp-content/plugins/quizess/src/admin/index.php
  • 144× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/quizess/views/header/header.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/quizess/vendor/php-di/php-di/src/Definition/Resolver/FactoryResolver.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Eightshift_Libs\\Core\\Service' not found in wp-content/plugins/quizess/vendor/infinum/eightshift-libs/src/custom-post-type/class-base-post-type.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'DI\\Definition\\Exception\\InvalidDefinition' not found in wp-content/plugins/quizess/vendor/php-di/php-di/src/Definition/Exception/InvalidAnnotation.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Quizess\\Blocks\\Abstracts\\Base_Block' not found in wp-content/plugins/quizess/src/blocks/class-section.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/quizess/vendor/psr/container/src/NotFoundExceptionInterface.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'DI\\Container' not found in wp-content/plugins/quizess/vendor/php-di/php-di/src/CompiledContainer.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/quizess/views/category/menu.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'DI\\Definition\\Source\\DefinitionSource' not found in wp-content/plugins/quizess/vendor/php-di/php-di/src/Definition/Source/SourceCache.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'SuperClosure\\Exception\\SuperClosureException' not found in wp-content/plugins/quizess/vendor/jeremeamia/superclosure/src/Exception/ClosureSerializationException.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=quiz
    • > Javascript (severe) in unknown
    //wp-content/plugins/quizess/skin/public/scripts/blocksQuizess-6b64236891eb88c8622f.js?ver=1.0.0 0:1445518 Uncaught TypeError: $ is not a function
    • > GET request to /wp-admin/post-new.php?post_type=question
    • > Console-api (warning) in unknown
    /wp-includes/js/dist/block-editor.min.js?ver=0cd49e3f951fc97cabb7 25:219944 "quizess-editor--style-css was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe." link#quizess-editor--style-css
    • > GET request to /wp-admin/admin.php?page=quizess_dashboard
    • > Console-api (warning) in wp-includes/js/dist/deprecated.min.js?ver=73ad3591e7bc95f4777a+1:627
    wp.editor.MediaPlaceholder is deprecated since version 5.3 and will be removed in version 6.2. Please use wp.blockEditor.MediaPlaceholder instead.
    • > GET request to /wp-admin/admin.php?page=quizess_dashboard
    • > Console-api (warning) in wp-includes/js/dist/deprecated.min.js?ver=73ad3591e7bc95f4777a+1:627
    `wp.data.select( 'core/editor' ).getSelectedBlockClientId` is deprecated since version 5.3 and will be removed in version 6.2. Please use `wp.data.select( 'core/block-editor' ).getSelectedBlockClientId` instead.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: "PayPal.Me/tihi321"
  • Screenshots: Please describe screenshot #0 in quizess/assets to your readme.txt
  • Screenshots: Screenshot #8 (Archive page) image required
You can take inspiration from this readme.txt

quizess/quizess.php Passed 13 tests

The primary PHP file in "Quizess" version 2.0.3 is used by WordPress to initiate all plugin functionality
60 characters long description:
Quizess plugin provides all functionality for making quizes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected30,893 lines of code in 498 files:
LanguageFilesBlank linesComment linesLines of code
PHP2152,4245,6229,572
CSS2502297,885
JavaScript1448401567,036
Sass67464772,680
JSON14001,751
Markdown2146301,042
PO File121396458
YAML6247249
XML34436167
Bourne Shell16538
SVG10015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.19
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces54
Interfaces29
Traits0
Classes138
▷ Abstract classes96.52%
▷ Concrete classes12993.48%
▷ Final classes107.75%
Methods613
▷ Static methods447.18%
▷ Public methods49079.93%
▷ Protected methods447.18%
▷ Private methods7912.89%
Functions42
▷ Named functions1842.86%
▷ Anonymous functions2457.14%
Constants74
▷ Global constants34.05%
▷ Class constants7195.95%
▷ Public constants71100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 5.72MB with 3.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
skin/public/images/meta-google.png7.58KB4.31KB▼ 43.19%
assets/icon-128×128.png12.88KB7.04KB▼ 45.37%
assets/banner-1544×500.png327.31KB111.90KB▼ 65.81%
assets/screenshot-06.png808.99KB227.44KB▼ 71.89%
skin/assets/images/meta-google.png7.58KB4.31KB▼ 43.19%