10% wiziq

Code Review | WizIQ

WordPress plugin WizIQ scored 10% from 54 tests.

About plugin

  • Plugin page: wiziq
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9.6
  • WordPress version: 5.9.2
  • First release: Nov 26, 2015
  • Latest release: Sep 5, 2018
  • Number of updates: 108
  • Update frequency: every 9.7 days
  • Top authors: WizIQ (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active / 6,602 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5610
    add_option was called with an argument that is deprecated since version 2.3.0 with no alternative available.

Server metrics [RAM: ▲1.47MB] [CPU: ▼305.08ms] Passed 4 tests

A check of server-side resources used by WizIQ
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.74 ▲1.2332.59 ▼26.34
Dashboard /wp-admin5.09 ▲1.6951.34 ▲17.16
Posts /wp-admin/edit.php4.96 ▲1.3244.98 ▲3.95
Add New Post /wp-admin/post-new.php8.62 ▲1.65105.33 ▼1,215.10
Media Library /wp-admin/upload.php5.04 ▲1.7552.64 ▲23.22
Content /wp-admin/admin.php?page=wiziq_content5.03229.37
Calendar /wp-admin/admin.php?page=wiziq_calendar5.0147.63
Courses /wp-admin/admin.php?page=wiziq5.0138.63
Create Pages /wp-admin/admin.php?page=wiziq_create_pages5.0137.19
Settings /wp-admin/admin.php?page=wiziq_settings5.0135.80
Enroll Users /wp-admin/admin.php?page=wiziq_enroll5.0737.55
WizIQ Class /wp-admin/admin.php?page=wiziq_class5.0234.22

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 156 new files
Database: 4 new tables, 8 new options
New tables
wp_wiziq_wclasses
wp_wiziq_contents
wp_wiziq_enroluser
wp_wiziq_courses
New WordPress options
api_url
timezone_api_url
secret_key
content_language
recurring_api_url
email_notification
access_key
content_url

Browser metrics Passed 4 tests

This is an overview of browser requirements for WizIQ
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,999 ▲24516.82 ▲1.2213.62 ▲7.612.50 ▲0.06
Dashboard /wp-admin2,943 ▲826.58 ▲0.37118.94 ▼12.80181.30 ▲22.00
Posts /wp-admin/edit.php2,740 ▲553.30 ▲0.0766.07 ▼2.14138.86 ▼16.12
Add New Post /wp-admin/post-new.php1,714 ▲5322.34 ▲5.39445.63 ▲26.26188.64 ▲31.24
Media Library /wp-admin/upload.php1,768 ▲705.79 ▲0.28126.67 ▼11.13208.62 ▲22.66
Content /wp-admin/admin.php?page=wiziq_content1,2292.7257.63110.32
Calendar /wp-admin/admin.php?page=wiziq_calendar1,0432.8365.67102.40
Courses /wp-admin/admin.php?page=wiziq1,3042.8659.03149.03
Create Pages /wp-admin/admin.php?page=wiziq_create_pages1,1932.8256.5485.85
Settings /wp-admin/admin.php?page=wiziq_settings1,2572.7058.40128.57
Enroll Users /wp-admin/admin.php?page=wiziq_enroll1,0532.8155.2886.58
WizIQ Class /wp-admin/admin.php?page=wiziq_class1,0332.8555.1871.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=wiziq_content
    • > Notice in wp-content/plugins/wiziq/wiziqapi/AuthBase.php+69
    fopen(): Content-type not specified assuming application/x-www-form-urlencoded
    • > GET request to /wp-admin/admin.php?page=wiziq
    • > Notice in wp-content/plugins/wiziq/functions/wiziq_courses.php+328
    Undefined variable: descriptionordering
    • > GET request to /wp-admin/admin.php?page=wiziq
    • > Notice in wp-content/plugins/wiziq/functions/wiziq_courses.php+356
    Undefined variable: startdateordering
    • > GET request to /wp-admin/admin.php?page=wiziq
    • > Notice in wp-content/plugins/wiziq/functions/wiziq_courses.php+364
    Undefined variable: enddateordering
    • > GET request to /wp-admin/admin.php?page=wiziq_enroll
    • > Notice in wp-content/plugins/wiziq/functions/wiziq_course_enroll.php+19
    Undefined index: course_id

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 take a closer look at the following
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wiziq/functions/wiziq_action_hooks.php:13
    • > PHP Fatal error
      require_once(): Failed opening required 'WIZIQ_PLUGIN_PATH/functions/wiziq_course_enroll.php' (include_path='.:/usr/share/php') in wp-content/plugins/wiziq/admin/wiziq_courses_enroll_users.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wiziq/frontend/wiziq_site.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wiziq/frontend/shortcode/wiziq_site.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Wiziq_Classes' not found in wp-content/plugins/wiziq/admin/wiziq_class.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Wiziq_Content' not found in wp-content/plugins/wiziq/admin/wiziq_content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wiziq/admin/admin_hooks.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Wiziq_Frontend_Courses' not found in wp-content/plugins/wiziq/frontend/shortcode/shortcode_wiziq.php:5
    • > PHP Warning
      Use of undefined constant WIZIQ_PLUGIN_PATH - assumed 'WIZIQ_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wiziq/admin/wiziq_courses_enroll_users.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wiziq/wiziq_config.php:7

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
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wiziq_class
    • > Network (severe)
    wp-content/plugins/wiziq/sorttable/sorttable.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wiziq_class
    • > Network (severe)
    wp-content/plugins/wiziq/fullcalendar/fullcalendar.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wiziq_class
    • > Network (severe)
    wp-content/plugins/wiziq/fullcalendar/fullcalendar_custom.css?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wiziq_class
    • > Network (severe)
    wp-content/plugins/wiziq/fullcalendar/lib/moment.min.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wiziq_class
    • > Network (severe)
    wp-content/plugins/wiziq/fullcalendar/fullcalendar.min.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wiziq_class
    • > Network (severe)
    wp-content/plugins/wiziq/sorttable/sorttable.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=wiziq_calendar
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).fullCalendar is not a function" "TypeError: jQuery(...).fullCalendar is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=wiziq_calendar:158:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/admin.php?page=wiziq_calendar
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: jQuery(...).fullCalendar is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

wiziq/wiziq.php Passed 13 tests

The main PHP script in "WizIQ" version 1.2 is automatically included on every request by WordPress
55 characters long description:
Making online teaching and learning easier for everyone

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected24,131 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PO File195,3509010,920
PHP281,4041,38110,836
JavaScript21311561,193
CSS347541,182

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 212)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity108.57
▷ Minimum class complexity4.00
▷ Maximum class complexity417.00
Average method complexity15.21
▷ Minimum method complexity1.00
▷ Maximum method complexity212.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods106
▷ Static methods00.00%
▷ Public methods106100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants97
▷ Global constants97100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
81 PNG files occupy 0.27MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/15/mov.png3.33KB0.96KB▼ 71.14%
images/15/mp3.png3.26KB0.74KB▼ 77.29%
stylesheet/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
images/15/folder.png3.09KB0.56KB▼ 81.75%
images/20/mov.png3.78KB1.28KB▼ 66.24%