72% stapp-video

Code Review | STApp Video Plugin

WordPress plugin STApp Video Plugin scored72%from 54 tests.

About plugin

  • Plugin page: stapp-video
  • Plugin version: 1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Mar 15, 2021
  • Latest release: Apr 18, 2021
  • Number of updates: 19
  • Update frequency: every 2.0 days
  • Top authors: stappdevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /415 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼10.40ms] Passed 4 tests

Server-side resources used by STApp Video Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.12 ▼0.83
Dashboard /wp-admin3.53 ▲0.1954.58 ▼14.93
Posts /wp-admin/edit.php3.59 ▲0.2357.10 ▲1.54
Add New Post /wp-admin/post-new.php6.03 ▲0.1587.58 ▼27.36
Media Library /wp-admin/upload.php3.38 ▲0.1539.85 ▲3.33
Pro Version /wp-admin/admin.php?page=stappvideo_pro_version3.4039.24
Overview /wp-admin/admin.php?page=stappvideo3.4140.06
New /wp-admin/admin.php?page=stappvideo_new3.4237.08

Server storage [IO: ▲0.24MB] [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: 60 new files
Database: 1 new table, 18 new options
New tables
wp_stapp_video_setting
New WordPress options
widget_recent-comments
stapp_video_version
stapp_video_pro_value
recovery_mode_email_last_sent
can_compress_scripts
stapp_video_desktop_4k_default_breakpoint
stapp_video_design_modus
stapp_video_show_cHD
widget_recent-posts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

STApp Video Plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,034 ▲28815.14 ▲0.985.91 ▲4.3041.82 ▼1.37
Dashboard /wp-admin2,356 ▲1826.12 ▲0.46109.86 ▲16.8140.89 ▲0.34
Posts /wp-admin/edit.php2,284 ▲1843.27 ▲1.2448.44 ▲7.5035.02 ▼0.49
Add New Post /wp-admin/post-new.php1,548 ▲1123.58 ▲5.28661.09 ▲11.4137.81 ▼31.60
Media Library /wp-admin/upload.php1,431 ▲284.10 ▼0.1080.78 ▼22.9543.27 ▼5.71
Pro Version /wp-admin/admin.php?page=stappvideo_pro_version1,4922.9643.7939.42
Overview /wp-admin/admin.php?page=stappvideo8221.7010.6428.22
New /wp-admin/admin.php?page=stappvideo_new8411.7014.6124.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=stappvideo
    • > Error in wp-content/plugins/stapp-video/includes/db/stapp_video_option.php+7
    Uncaught Error: Class 'stapp_calculator_option' not found in wp-content/plugins/stapp-video/includes/db/stapp_video_option.php:7
    Stack trace:
    #0 wp-content/plugins/stapp-video/admin/menu/OverviewSubMenuHTML_HelpDialog.php(3): stapp_video_get_option()
    #1 wp-content/plugins/stapp-video/admin/menu/OverviewSubMenuHTML.php(56): require_once('/var/www/wordpr...')
    #2 wp-content/plugins/stapp-video/admin/admin.php(86): require_once('/var/www/wordpr...')
    #3 wp-includes/class-wp-hook.php(310): stapp_video_page_mainmenu_html()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=stappvideo_new
    • > Error in wp-content/plugins/stapp-video/includes/db/stapp_video_option.php+7
    Uncaught Error: Class 'stapp_calculator_option' not found in wp-content/plugins/stapp-video/includes/db/stapp_video_option.php:7
    Stack trace:
    #0 wp-content/plugins/stapp-video/admin/menu/CreateSubMenuHTML_HelpDialog.php(3): stapp_video_get_option()
    #1 wp-content/plugins/stapp-video/admin/menu/CreateSubMenuHTML.php(87): require_once('/var/www/wordpr...')
    #2 wp-content/plugins/stapp-video/admin/admin.php(90): require_once('/var/www/wordpr...')
    #3 wp-includes/class-wp-hook.php(310): stapp_video_page_create_html()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown

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
Almost there! Just fix the following items
  • 39× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(STAPP_VIDEO_PLUGIN_DIR/includes/db/stapp_video_writeData.php): failed to open stream: No such file or directory in wp-content/plugins/stapp-video/admin/admin.php on line 3
    • > PHP Warning
      require_once(STAPP_VIDEO_PLUGIN_DIR/includes/db/stapp_video_data_validation.php): failed to open stream: No such file or directory in wp-content/plugins/stapp-video/includes/db/stapp_video_writeData.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/stapp-video/admin/menu/CreateSubMenuHTML_Form.php:5
    • > PHP Warning
      include_once(): Failed opening 'STAPP_VIDEO_PLUGIN_DIR/includes/stapp_activate_plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/stapp-video/admin/admin.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'STAPP_VIDEO_PLUGIN_DIR/includes/stapp_video_shortcode.php' (include_path='.:/usr/share/php') in wp-content/plugins/stapp-video/stapp_video_settings.php on line 4
    • > PHP Warning
      Use of undefined constant STAPP_VIDEO_PLUGIN_DIR - assumed 'STAPP_VIDEO_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/stapp-video/admin/admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/stapp-video/admin/menu/ProVersionSubMenuHTML_Form.php:4
    • > PHP Warning
      include_once(STAPP_VIDEO_PLUGIN_DIR/includes/stapp_activate_plugin.php): failed to open stream: No such file or directory in wp-content/plugins/stapp-video/admin/admin.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/stapp-video/admin/menu/CreateSubMenuHTML_NoImageMessage.php:4
    • > PHP Warning
      Use of undefined constant STAPP_VIDEO_PLUGIN_DIR - assumed 'STAPP_VIDEO_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/stapp-video/stapp_video_settings.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=stappvideo_new
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'checked')" "TypeError: Cannot read properties of null (reading 'checked')\n at setEnableVideoBreakpoint (/wp-admin/admin.php?page=stappvideo_new:822:85)\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=stappvideo_new:811:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=stappvideo_new
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'checked')

Optimizations

Plugin configuration 93% 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
4 plugin tags: shortcodes, tools, video, media

stapp-video/stapp_video.php 85% from 13 tests

The primary PHP file in "STApp Video Plugin" version 1.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("stapp-video.php" instead of "stapp_video.php")

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
Good job! No executable or dangerous file extensions detected3,764 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP28429511,987
CSS624429971
PO File2161204393
SVG1200206
JavaScript3562153
HTML34054

PHP code Passed 2 tests

Analyzing 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 complexity8.08
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods85
▷ Static methods00.00%
▷ Public methods2731.76%
▷ Protected methods00.00%
▷ Private methods5868.24%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants850.00%
▷ Class constants850.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin