62% vidcheck

Code Review | VidCheck

WordPress plugin VidCheck scored 62% from 54 tests.

About plugin

  • Plugin page: vidcheck
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2021
  • Latest release: Nov 24, 2021
  • Number of updates: 2
  • Update frequency: every 6.0 days
  • Top authors: factly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 221 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼7.15ms] Passed 4 tests

This is a short check of server-side resources used by VidCheck
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.99 ▲1.23
Dashboard /wp-admin3.44 ▲0.1447.53 ▼8.59
Posts /wp-admin/edit.php3.48 ▲0.1249.63 ▼2.58
Add New Post /wp-admin/post-new.php6.22 ▲0.3478.55 ▼14.52
Media Library /wp-admin/upload.php3.38 ▲0.1534.28 ▼2.90
Claimant View /wp-admin/admin.php?page=Claimant_View3.2729.27
Claimants /wp-admin/admin.php?page=Claimant_List3.3834.91
Vidcheck Delete /wp-admin/admin.php?page=Vidcheck_Delete3.2732.13
Rating Update /wp-admin/admin.php?page=Rating_Update3.3233.40
Claimant Update /wp-admin/admin.php?page=Claimant_Update3.3231.11
VidCheck /wp-admin/admin.php?page=vidchecks-list3.3031.45
Claim Delete /wp-admin/admin.php?page=claim_delete3.3030.28
Claimant Delete /wp-admin/admin.php?page=Claimant_Delete3.3027.82
Rating Delete /wp-admin/admin.php?page=Rating_Delete3.3031.68
edit_Claim /wp-admin/admin.php?page=edit_new_claim3.3230.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 34 new files
Database: 4 new tables, 7 new options
New tables
wp_vidcheck_claim
wp_vidcheck_claimant
wp_vidcheck_video
wp_vidcheck_ratings
New WordPress options
widget_recent-comments
can_compress_scripts
jal_db_version
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for VidCheck
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲12613.22 ▼1.431.67 ▼0.3244.49 ▼0.97
Dashboard /wp-admin2,264 ▲765.80 ▲0.9398.98 ▼18.1538.47 ▼17.98
Posts /wp-admin/edit.php2,147 ▲582.02 ▼0.0141.20 ▲1.5536.00 ▲1.97
Add New Post /wp-admin/post-new.php1,567 ▲4723.33 ▲0.03616.25 ▼62.8151.39 ▼21.43
Media Library /wp-admin/upload.php1,440 ▲524.19 ▼0.0696.73 ▼6.6744.06 ▼3.52
Claimant View /wp-admin/admin.php?page=Claimant_View8762.0223.9828.42
Claimants /wp-admin/admin.php?page=Claimant_List1,1923.0442.3227.73
Vidcheck Delete /wp-admin/admin.php?page=Vidcheck_Delete7982.0422.7322.04
Rating Update /wp-admin/admin.php?page=Rating_Update1,1623.0340.6567.12
Claimant Update /wp-admin/admin.php?page=Claimant_Update1,1353.0437.8063.66
VidCheck /wp-admin/admin.php?page=vidchecks-list8792.0426.0034.38
Claim Delete /wp-admin/admin.php?page=claim_delete7982.0521.6623.58
Claimant Delete /wp-admin/admin.php?page=Claimant_Delete7982.0223.0920.73
Rating Delete /wp-admin/admin.php?page=Rating_Delete8192.0221.6421.61
edit_Claim /wp-admin/admin.php?page=edit_new_claim1,3754.2255.4034.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 4 tables
    • wp_vidcheck_video
    • wp_vidcheck_claimant
    • wp_vidcheck_ratings
    • wp_vidcheck_claim
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • jal_db_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Claimant_Update
    • > Notice in wp-content/plugins/vidcheck/claimant/claimant_update.php+8
    Undefined index: id
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_new_claim
    • > Notice in wp-content/plugins/vidcheck/vidchecks/edit_new_claim.php+87
    Undefined offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Claimant_Update
    • > Notice in wp-content/plugins/vidcheck/claimant/claimant_update.php+35
    Trying to get property 'name' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Claimant_Update
    • > Notice in wp-content/plugins/vidcheck/claimant/claimant_update.php+42
    Trying to get property 'slug' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Claimant_Update
    • > Notice in wp-content/plugins/vidcheck/claimant/claimant_update.php+46
    Trying to get property 'tagline' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Claimant_Update
    • > Notice in wp-content/plugins/vidcheck/claimant/claimant_update.php+51
    Trying to get property 'description' of non-object
    • > GET request to /wp-admin/admin.php?page=Vidcheck_Delete
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'vid_vidcheck_delete' not found or invalid function name
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Claimant_Update
    • > Notice in wp-content/plugins/vidcheck/claimant/claimant_update.php+31
    Trying to get property 'id' of non-object
    • > GET request to /wp-admin/admin.php?page=Rating_Update
    • > Notice in wp-content/plugins/vidcheck/ratings/rating_update.php+39
    Trying to get property 'numericvalue' of non-object
    • > GET request to /wp-admin/admin.php?page=Rating_Update
    • > Notice in wp-content/plugins/vidcheck/ratings/rating_update.php+49
    Trying to get property 'color' of non-object
    • > GET request to /wp-admin/admin.php?page=Rating_Update
    • > Notice in wp-content/plugins/vidcheck/ratings/rating_update.php+55
    Trying to get property 'bg_color' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Rating_Update
    • > Notice in wp-content/plugins/vidcheck/ratings/rating_update.php+62
    Trying to get property 'fe_image' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Claimant_Update
    • > Notice in wp-content/plugins/vidcheck/claimant/claimant_update.php+60
    Trying to get property 'imageName' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_new_claim
    • > Notice in wp-content/plugins/vidcheck/vidchecks/edit_new_claim.php+11
    Undefined index: video_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_new_claim
    • > Notice in wp-content/plugins/vidcheck/vidchecks/edit_new_claim.php+69
    Trying to get property 'title' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_new_claim
    • > Notice in wp-content/plugins/vidcheck/vidchecks/edit_new_claim.php+75
    Trying to get property 'url' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_new_claim
    • > Notice in wp-content/plugins/vidcheck/vidchecks/edit_new_claim.php+81
    Trying to get property 'total_duration' of non-object
    • > GET request to /wp-admin/admin.php?page=edit_new_claim
    • > Notice in wp-content/plugins/vidcheck/vidchecks/edit_new_claim.php+87
    Trying to get property 'summary' of non-object

SRP 50% 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
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vidcheck/vidcheck_delete.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vidcheck/vidchecks/claim_delete.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/vidcheck/vidcheck.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vidcheck/ratings/rating_delete.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/vidcheck/claimant/claimant_list.php:246
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vidcheck/claimant/claimant_delete.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/vidcheck/single-vidcheck.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/vidcheck/all-vidchecks.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/vidcheck/ratings/rating_list.php:260

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/admin.php?page=Rating_Update
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=Rating_Update 182 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=Rating_Update
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=Rating_Update 188 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === vidcheck === )
You can take inspiration from this readme.txt

vidcheck/vidcheck.php 92% from 13 tests

This is the main PHP file of "VidCheck" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 378 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected5,740 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP217801573,353
CSS227411,526
JavaScript3613821
Markdown123040

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/icons/clock.png1.81KB0.81KB▼ 55.30%
claimant/no_claim.png1.10KB1.05KB▼ 4.10%
inc/icons/no_image.png1.10KB1.05KB▼ 4.10%
ratings/no_rating.png1.10KB1.05KB▼ 4.10%