10% vcp-events

Code Review | VCP Events

WordPress plugin VCP Events scored10%from 54 tests.

About plugin

  • Plugin page: vcp-events
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 11, 2017
  • Latest release: Apr 18, 2018
  • Number of updates: 14
  • Update frequency: every 13.7 days
  • Top authors: kpmediadesigner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /679 total downloads

Benchmarks

Plugin footprint 40% 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
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/vcp-events/vcp-shortcode.php+9
    Undefined variable: pre

Server metrics [RAM: ▼1.59MB] [CPU: ▼49.12ms] Passed 4 tests

Analyzing server-side resources used by VCP Events
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.40 ▼1.066.82 ▼32.36
Dashboard /wp-admin2.42 ▼0.897.89 ▼39.78
Posts /wp-admin/edit.php2.42 ▼0.948.37 ▼38.39
Add New Post /wp-admin/post-new.php2.42 ▼3.478.64 ▼85.94
Media Library /wp-admin/upload.php2.42 ▼0.818.09 ▼26.36
All Video Comments Plus /wp-admin/edit.php?post_type=vcp2.428.23
Add New /wp-admin/post-new.php?post_type=vcp2.428.96
Video Comments Plus Options /wp-admin/edit.php?post_type=vcp&page=Video_Comments_Plus2.429.87

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by VCP Events
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲13114.48 ▲0.122.84 ▲0.8239.31 ▼5.63
Dashboard /wp-admin2,244 ▲535.79 ▲0.9398.99 ▼9.3039.29 ▼6.65
Posts /wp-admin/edit.php2,130 ▲412.01 ▲0.0138.68 ▼5.9635.85 ▼0.47
Add New Post /wp-admin/post-new.php1,555 ▲2218.22 ▼4.77614.19 ▼61.7256.72 ▲4.21
Media Library /wp-admin/upload.php1,426 ▲354.21 ▲0.04103.46 ▲1.5442.98 ▼0.73
All Video Comments Plus /wp-admin/edit.php?post_type=vcp1,1021.9631.3227.80
Add New /wp-admin/post-new.php?post_type=vcp3,08313.76407.94174.17
Video Comments Plus Options /wp-admin/edit.php?post_type=vcp&page=Video_Comments_Plus9442.0624.6525.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/vcp-events/vcp-shortcode.php+9
    Undefined variable: pre
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=vcp&page=Video_Comments_Plus
    • > Notice in wp-content/plugins/vcp-events/vcp-shortcode.php+9
    Undefined variable: pre
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/kjp_custom_posts.php+246
    Undefined index: video_link
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/Video-Comments-Plus.php+348
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/kjp_custom_posts.php+311
    Undefined index: vcp_info_content
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/Video-Comments-Plus.php+350
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/kjp_custom_posts.php+246
    Undefined index: vcp_color
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/kjp_custom_posts.php+311
    Undefined index: vcp_public_comment_display
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/kjp_custom_posts.php+323
    Undefined variable: basic_dropdown
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/kjp_custom_posts.php+311
    Undefined index: vcp_fullscreen_comment_display
    • > GET request to /wp-admin/post-new.php?post_type=vcp
    • > Notice in wp-content/plugins/vcp-events/kjp_custom_posts.php+277
    Undefined index: vcp_split

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/vcp-events/vcp_options_menu.php:147
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vcp-events/vcp_src_saver.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/vcp-events/vcp-shortcode.php:9
    • > PHP Warning
      readfile(wp-content/plugins/vcp-events/vcp-src-db.xml): failed to open stream: No such file or directory in /var/www/wordpress/wp-content/plugins/vcp-events/vcp-download-xml.php on line 7

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: video, google, livestreaming, comments, google plus

vcp-events/Video-Comments-Plus.php 92% from 13 tests

The main PHP file in "VCP Events" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("vcp-events.php" instead of "Video-Comments-Plus.php")

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
Everything looks great! No dangerous files found in this plugin3,076 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP72211041,788
CSS2717596
JavaScript17337582
SVG1000110

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods97
▷ Static methods00.00%
▷ Public methods8587.63%
▷ Protected methods1212.37%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.22MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/InfoBoxIcon.png2.29KB1.63KB▼ 28.72%
icons/More.png0.32KB0.17KB▼ 46.06%
icons/Fullscreen.png0.71KB0.38KB▼ 46.98%
icons/Comment_Display.png0.67KB0.45KB▼ 32.41%
icons/Link.png3.13KB2.17KB▼ 30.52%