68% auto-youtube-importer

Code Review | Auto YouTube Importer

WordPress plugin Auto YouTube Importer scored68%from 54 tests.

About plugin

  • Plugin page: auto-youtube-impo...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Dec 1, 2021
  • Latest release: Aug 15, 2023
  • Number of updates: 11
  • Update frequency: every 56.5 days
  • Top authors: secondlinethemes (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /9,218 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.18MB] [CPU: ▲4.99ms] Passed 4 tests

This is a short check of server-side resources used by Auto YouTube Importer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.64 ▲1.1848.55 ▲6.65
Dashboard /wp-admin4.50 ▲1.1556.60 ▼5.35
Posts /wp-admin/edit.php4.61 ▲1.2558.84 ▲14.19
Add New Post /wp-admin/post-new.php7.10 ▲1.21106.72 ▲4.45
Media Library /wp-admin/upload.php4.42 ▲1.1951.50 ▲16.10
Add New /wp-admin/post-new.php?post_type=secondline_import_yt4.4652.60
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.5952.54
YouTube Imports /wp-admin/edit.php?post_type=secondline_import_yt4.4657.12
YouTube Importer /wp-admin/tools.php?page=youtube-importer-secondline4.4945.69

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 129 new files
Database: 4 new tables, 9 new options
New tables
wp_actionscheduler_actions
wp_actionscheduler_claims
wp_actionscheduler_logs
wp_actionscheduler_groups
New WordPress options
action_scheduler_hybrid_store_demarkation
db_upgraded
can_compress_scripts
schema-ActionScheduler_StoreSchema
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
schema-ActionScheduler_LoggerSchema
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Auto YouTube Importer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.20 ▼1.091.79 ▲0.0941.67 ▼2.79
Dashboard /wp-admin2,236 ▲484.88 ▼0.03110.75 ▼10.0438.79 ▼5.69
Posts /wp-admin/edit.php2,118 ▲292.04 ▼0.0141.07 ▲3.8235.56 ▲0.91
Add New Post /wp-admin/post-new.php1,537 ▲923.25 ▲0.10645.48 ▼45.3659.05 ▲7.95
Media Library /wp-admin/upload.php1,421 ▲334.26 ▲0.06103.22 ▼0.7944.18 ▲1.53
Add New /wp-admin/post-new.php?post_type=secondline_import_yt1,4312.5450.7652.26
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2662.2426.9932.41
YouTube Imports /wp-admin/edit.php?post_type=secondline_import_yt1,1062.0134.9731.93
YouTube Importer /wp-admin/tools.php?page=youtube-importer-secondline1,0343.1941.0827.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_actionscheduler_logs
    • wp_actionscheduler_claims
    • wp_actionscheduler_actions
    • wp_actionscheduler_groups
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • schema-ActionScheduler_LoggerSchema
    • can_compress_scripts
    • action_scheduler_hybrid_store_demarkation
    • theysaidso_admin_options
    • db_upgraded
    • schema-ActionScheduler_StoreSchema
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/auto-youtube-importer/templates/_form-field.php
  • 49× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php:21
    • > PHP Warning
      Use of undefined constant YOUTUBE_IMPORTER_SECONDLINE_BASE_FILE_PATH - assumed 'YOUTUBE_IMPORTER_SECONDLINE_BASE_FILE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/auto-youtube-importer/definitions.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_AdminView_Deprecated' not found in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/classes/ActionScheduler_AdminView.php:7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schema' not found in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/auto-youtube-importer/lib/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

auto-youtube-importer/auto-youtube-importer.php Passed 13 tests

The main file in "Auto YouTube Importer" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
86 characters long description:
A simple YouTube video importer plugin with automatic / ongoing YouTube sync features.

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
Everything looks great! No dangerous files found in this plugin9,258 lines of code in 121 files:
LanguageFilesBlank linesComment linesLines of code
PHP1162,2645,7768,686
CSS1650312
JavaScript1471165
Markdown237090
JSON1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.05
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces8
Interfaces3
Traits0
Classes95
▷ Abstract classes1515.79%
▷ Concrete classes8084.21%
▷ Final classes00.00%
Methods700
▷ Static methods11115.86%
▷ Public methods52474.86%
▷ Protected methods13919.86%
▷ Private methods375.29%
Functions45
▷ Named functions3271.11%
▷ Anonymous functions1328.89%
Constants47
▷ Global constants1429.79%
▷ Class constants3370.21%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/loader-icon.png5.31KB3.70KB▼ 30.37%