74% vize-tests-basic

Code Review | VIZE Tests - Basic

WordPress plugin VIZE Tests - Basic scored74%from 54 tests.

About plugin

  • Plugin page: vize-tests-basic
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Jul 4, 2020
  • Latest release: May 17, 2021
  • Number of updates: 7
  • Update frequency: every 45.4 days
  • Top authors: zeeshanelahi83 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /609 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼2.06ms] Passed 4 tests

This is a short check of server-side resources used by VIZE Tests - Basic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3147.51 ▲2.58
Dashboard /wp-admin3.63 ▲0.3354.29 ▲5.47
Posts /wp-admin/edit.php3.68 ▲0.3255.35 ▼0.58
Add New Post /wp-admin/post-new.php6.15 ▲0.2688.51 ▼13.52
Media Library /wp-admin/upload.php3.49 ▲0.2639.83 ▲3.28
Manage Questions /wp-admin/admin.php?page=questions_list3.4639.61
Manage Tests /wp-admin/admin.php?page=tests_list3.4635.14

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for VIZE Tests - Basic
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14113.86 ▼0.3210.28 ▲8.4744.06 ▲4.82
Dashboard /wp-admin2,215 ▲455.52 ▼0.1785.18 ▼8.1341.83 ▲4.13
Posts /wp-admin/edit.php2,123 ▲232.04 ▲0.0435.04 ▼3.0741.99 ▲6.66
Add New Post /wp-admin/post-new.php1,564 ▲1723.35 ▲0.16663.23 ▼41.5358.47 ▼2.55
Media Library /wp-admin/upload.php1,423 ▲264.23 ▼0.1296.39 ▼18.3641.51 ▼5.00
Manage Questions /wp-admin/admin.php?page=questions_list1,0601.7927.6031.93
Manage Tests /wp-admin/admin.php?page=tests_list1,0471.7524.8228.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • vize_test_questions
    • vize_tests
    • vize_test_answers
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/vize-tests-basic/admin/class-vize-test-questions-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/vize-tests-basic/admin/class-vize-tests-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/vize-tests-basic/public/class-vize-tests-public.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/vize-tests-basic/includes/class-vize-tests-activator.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/vize-tests-basic/admin/class-vize-tests-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/vize-tests-basic/admin/class-vize-test-questions-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/vize-tests-basic/public/partials/vize-test-body-view.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/vize-tests-basic/admin/partials/test-form.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/vize-tests-basic/admin/partials/tests-list.php:9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/vize-tests-basic/includes/class-vize-tests-activator.php on line 3

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: multiple choice questions, quiz, mcqs, test

vize-tests-basic/index.php 85% from 13 tests

"VIZE Tests - Basic" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("vize-tests-basic.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,496 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP205941,1681,687
JavaScript43071951,428
CSS27121381

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.33
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods87
▷ Static methods1011.49%
▷ Public methods7687.36%
▷ Protected methods44.60%
▷ Private methods78.05%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin