84% yaam-youtube-autoplay-and-mute

Code Review | YAAM - YouTube Autoplay And Mute

WordPress plugin YAAM - YouTube Autoplay And Mute scored84%from 54 tests.

About plugin

  • Plugin page: yaam-youtube-auto...
  • Plugin version: 0.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Apr 6, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: 02geek (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,021 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.01MB] [CPU: ▼2.42ms] Passed 4 tests

Analyzing server-side resources used by YAAM - YouTube Autoplay And Mute
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.16 ▲0.42
Dashboard /wp-admin3.31 ▲0.0155.25 ▲1.78
Posts /wp-admin/edit.php3.37 ▲0.0149.68 ▼1.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.78 ▼5.81
Media Library /wp-admin/upload.php3.24 ▲0.0134.59 ▼3.18

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for YAAM - YouTube Autoplay And Mute
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.31 ▼0.101.65 ▼0.0341.31 ▼4.04
Dashboard /wp-admin2,198 ▲185.62 ▲0.0490.92 ▼9.2640.26 ▼3.77
Posts /wp-admin/edit.php2,103 ▼01.96 ▼0.0839.87 ▼0.7435.38 ▲1.92
Add New Post /wp-admin/post-new.php1,526 ▼023.56 ▲0.54598.52 ▼44.2145.94 ▼15.19
Media Library /wp-admin/upload.php1,403 ▲34.13 ▼0.0598.84 ▼9.8541.88 ▼2.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/yaam-youtube-autoplay-and-mute/youtube-autoplay-and-mute.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt is a good inspiration

yaam-youtube-autoplay-and-mute/youtube-autoplay-and-mute.php 92% from 13 tests

The main PHP file in "YAAM - YouTube Autoplay And Mute" ver. 0.0.6 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yaam-youtube-autoplay-and-mute.php" instead of "youtube-autoplay-and-mute.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected71 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript119840
PHP1222431

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin