84% hivista-youtube

Code Review | Hivista YouTube

WordPress plugin Hivista YouTube scored84%from 54 tests.

About plugin

  • Plugin page: hivista-youtube
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 10, 2014
  • Latest release: Feb 11, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: gurieveugen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /779 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.35MB] [CPU: ▼13.59ms] Passed 4 tests

A check of server-side resources used by Hivista YouTube
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.62 ▼33.59
Dashboard /wp-admin3.32 ▲0.0143.79 ▼6.35
Posts /wp-admin/edit.php3.37 ▲0.0149.30 ▲2.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.52 ▼9.82
Media Library /wp-admin/upload.php3.24 ▲0.0133.12 ▼4.58

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Hivista YouTube
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.15 ▼0.421.94 ▲0.2448.87 ▲5.61
Dashboard /wp-admin2,195 ▲155.62 ▼0.0199.03 ▲6.0642.65 ▲0.23
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0436.72 ▼1.1835.37 ▼3.95
Add New Post /wp-admin/post-new.php1,529 ▲123.46 ▲0.44678.44 ▲53.7558.42 ▲2.60
Media Library /wp-admin/upload.php1,394 ▼34.21 ▼0.01106.77 ▲0.2943.50 ▼1.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/hivista-youtube/hivista_youtube.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/hivista-youtube/hivista_youtube.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
Please take inspiration from this readme.txt

hivista-youtube/hivista_youtube.php 92% from 13 tests

"Hivista YouTube" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hivista-youtube.php" instead of "hivista_youtube.php")

Code Analysis Passed 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 detected70 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP144448
CSS11011
JavaScript11311

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity2.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin