83% auto-last-youtube-video

Code Review | Auto Last Youtube Video

WordPress plugin Auto Last Youtube Video scored83%from 54 tests.

About plugin

  • Plugin page: auto-last-youtube...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 29, 2014
  • Latest release: May 8, 2020
  • Number of updates: 11
  • Update frequency: every 194.6 days
  • Top authors: davidmerinas (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /8,081 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.49ms] Passed 4 tests

Server-side resources used by Auto Last Youtube Video
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.65 ▼1.31
Dashboard /wp-admin3.34 ▼0.0044.37 ▼14.51
Posts /wp-admin/edit.php3.39 ▲0.0348.13 ▲1.41
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.54 ▼14.83
Media Library /wp-admin/upload.php3.26 ▲0.0334.33 ▲0.70

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 215 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Auto Last Youtube Video
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3113.25 ▼1.181.60 ▼0.4441.31 ▲1.10
Dashboard /wp-admin2,206 ▲184.85 ▼0.01103.53 ▼5.0937.29 ▼12.58
Posts /wp-admin/edit.php2,089 ▼31.97 ▼0.0137.15 ▼2.6032.81 ▼4.61
Add New Post /wp-admin/post-new.php1,514 ▼1417.60 ▼0.76648.35 ▲31.1464.28 ▼8.08
Media Library /wp-admin/upload.php1,391 ▲94.17 ▼0.1296.34 ▼5.2243.56 ▲0.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 521× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant AUTO_LAST_YOUTUBE_VIDEO_PATH - assumed 'AUTO_LAST_YOUTUBE_VIDEO_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/auto-last-youtube-video/inc/Zend/Validate/Between.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'AUTO_LAST_YOUTUBE_VIDEO_PATHinc///Zend/Validate/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/auto-last-youtube-video/inc/Zend/Validate/Int.php on line 25
    • > PHP Warning
      require_once(AUTO_LAST_YOUTUBE_VIDEO_PATHinc///Zend/Feed/Reader/FeedAbstract.php): failed to open stream: No such file or directory in wp-content/plugins/auto-last-youtube-video/inc/Zend/Feed/Reader/Feed/Atom.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'AUTO_LAST_YOUTUBE_VIDEO_PATHinc///Zend/Validate/Barcode/AdapterAbstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/auto-last-youtube-video/inc/Zend/Validate/Barcode/Upce.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'AUTO_LAST_YOUTUBE_VIDEO_PATHinc///Zend/Validate/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/auto-last-youtube-video/inc/Zend/Validate/File/MimeType.php on line 25
    • > PHP Warning
      Use of undefined constant AUTO_LAST_YOUTUBE_VIDEO_PATH - assumed 'AUTO_LAST_YOUTUBE_VIDEO_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/auto-last-youtube-video/inc/Zend/Validate/LessThan.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'AUTO_LAST_YOUTUBE_VIDEO_PATHinc///Zend/Validate/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/auto-last-youtube-video/inc/Zend/Validate/Ccnum.php on line 25
    • > PHP Warning
      require_once(AUTO_LAST_YOUTUBE_VIDEO_PATHinc///Zend/Validate/File/Exists.php): failed to open stream: No such file or directory in wp-content/plugins/auto-last-youtube-video/inc/Zend/Validate/File/NotExists.php on line 25
    • > PHP Warning
      require_once(AUTO_LAST_YOUTUBE_VIDEO_PATHinc///Zend/Feed/Pubsubhubbub.php): failed to open stream: No such file or directory in wp-content/plugins/auto-last-youtube-video/inc/Zend/Feed/Pubsubhubbub/HttpResponse.php on line 24
    • > PHP Warning
      Use of undefined constant AUTO_LAST_YOUTUBE_VIDEO_PATH - assumed 'AUTO_LAST_YOUTUBE_VIDEO_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/auto-last-youtube-video/inc/Zend/Validate/Hostname/De.php on line 27

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png) image missing
The official readme.txt is a good inspiration

auto-last-youtube-video/autolastyoutubevideo.php 85% from 13 tests

The entry point to "Auto Last Youtube Video" version 1.0.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("auto-last-youtube-video.php" instead of "autolastyoutubevideo.php")
  • Description: The description should be shorter than 140 characters (currently 390 characters long)

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
There were no executable files found in this plugin26,264 lines of code in 210 files:
LanguageFilesBlank linesComment linesLines of code
PHP2084,38418,45126,261
JavaScript1102
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.36
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces14
Traits0
Classes189
▷ Abstract classes136.88%
▷ Concrete classes17693.12%
▷ Final classes00.00%
Methods1,443
▷ Static methods1097.55%
▷ Public methods1,21984.48%
▷ Protected methods21614.97%
▷ Private methods80.55%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants245
▷ Global constants20.82%
▷ Class constants24399.18%
▷ Public constants243100.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.26MB with 0.16MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png262.11KB95.27KB▼ 63.65%