10% vcos

Code Review | vcOS

WordPress plugin vcOS scored10%from 54 tests.

About plugin

  • Plugin page: vcos
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2013
  • Latest release: Feb 21, 2014
  • Number of updates: 104
  • Update frequency: every 1.4 days
  • Top authors: jnwry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,431 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/vcos/vcos.php+558
    Undefined index: vcos_category

Server metrics [RAM: ▼1.82MB] [CPU: ▼54.90ms] Passed 4 tests

A check of server-side resources used by vcOS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.308.93 ▼37.51
Dashboard /wp-admin2.19 ▼1.126.95 ▼43.11
Posts /wp-admin/edit.php2.19 ▼1.176.08 ▼48.67
Add New Post /wp-admin/post-new.php2.19 ▼3.707.53 ▼90.31
Media Library /wp-admin/upload.php2.19 ▼1.057.42 ▼29.64
Ver Materias /wp-admin/admin.php?page=list2.196.18
Agregar Nuevo /wp-admin/admin.php?page=create2.196.81
Editar /wp-admin/admin.php?page=edit2.198.18
vcOS ADMIN /wp-admin/admin.php?page=vcos2.196.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: 10 new tables, 7 new options
New tables
wp_vcos_studenthomework
wp_vcos_settings
wp_vcos_locale
wp_vcos_user_locales
wp_vcos_courses
wp_vcos_studentcourses
wp_vcos_studentanswers
wp_vcos_fexams
wp_vcos_homework
wp_vcos_studentfexams
New WordPress options
widget_theysaidso_widget
widget_vcos_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

vcOS: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲17313.57 ▼0.789.29 ▲7.5742.85 ▲0.01
Dashboard /wp-admin2,214 ▲345.56 ▼0.1095.81 ▲3.7787.95 ▲45.05
Posts /wp-admin/edit.php2,134 ▲311.98 ▼0.0439.45 ▼0.9939.15 ▲6.39
Add New Post /wp-admin/post-new.php1,570 ▲4322.93 ▼0.27684.83 ▲41.3855.74 ▲2.57
Media Library /wp-admin/upload.php1,434 ▲374.08 ▼0.12105.63 ▲3.1668.80 ▲22.82
Ver Materias /wp-admin/admin.php?page=list8322.1525.7532.23
Agregar Nuevo /wp-admin/admin.php?page=create1,6356.51133.7199.29
Editar /wp-admin/admin.php?page=edit1,6666.65142.2098.88
vcOS ADMIN /wp-admin/admin.php?page=vcos8541.9925.8930.77
vcOS /wp-admin/settings.php260.420.1112.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/vcos/vcos.php+558
    Undefined index: vcos_category
  • The plugin did not uninstall successfully, leaving 10 tables in the database
    • wp_vcos_studenthomework
    • wp_vcos_fexams
    • wp_vcos_user_locales
    • wp_vcos_courses
    • wp_vcos_locale
    • wp_vcos_studentcourses
    • wp_vcos_homework
    • wp_vcos_studentfexams
    • wp_vcos_settings
    • wp_vcos_studentanswers
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_vcos_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vcos
    • > Notice in wp-content/plugins/vcos/vcos.php+558
    Undefined index: vcos_category
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vcos
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+6
    Undefined index: course
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vcos
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+106
    Undefined index: courseid
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+224
    Undefined variable: _course
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+230
    Undefined variable: _details
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Warning in wp-content/plugins/vcos/vcos_admin.php+230
    Use of undefined constant details - assumed 'details' (this will throw an Error in a future version of PHP)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+234
    Undefined variable: _credits
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+247
    Undefined variable: _ownerid
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+257
    Undefined variable: _proid
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+278
    Undefined variable: course
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+278
    Trying to get property 'enabled' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+279
    Undefined variable: _courseid
    • > GET request to /wp-admin/admin.php?page=vcos
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+137
    Trying to get property 'courses' of non-object
    • > GET request to /wp-admin/admin.php?page=vcos
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+139
    Trying to get property 'IDmateria' of non-object
    • > GET request to /wp-admin/admin.php?page=vcos
    • > Notice in wp-content/plugins/vcos/vcos_admin.php+142
    Trying to get property 'course' of non-object

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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/vcos/admin_head-export.php
    • > /wp-content/plugins/vcos/vcos_admin.php
    • > /wp-content/plugins/vcos/crosscheck.php
  • 56× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/vcos/mysql.php on line 94
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/vcos/mysql.php on line 3
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/vcos/mysql.php on line 4
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/vcos/functions.php on line 4
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/vcos/mysql.php on line 65
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/vcos/mysql.php on line 94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/vcos/users.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/vcos/vcos.php:33
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/vcos/mysql.php on line 49
    • > PHP Notice
      Undefined index: course in wp-content/plugins/vcos/vcos_admin.php on line 6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/settings.php
    • > Network (severe)
    wp-admin/settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: virtual, school, learning, teaching, enseanza...

vcos/vcos.php 92% from 13 tests

The primary PHP file in "vcOS" version 1.4.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 225 characters long)

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 plugin2,101 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP173121011,772
CSS21470322
JavaScript1307

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.23
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.13MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vcos_icon.png0.66KB0.72KB0.00%
vcos_large.png134.62KB59.61KB▼ 55.72%