84% am-youtube-it

Code Review | AM YouTube it

WordPress plugin AM YouTube it scored 84% from 54 tests.

About plugin

  • Plugin page: am-youtube-it
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 5.9.2
  • First release: May 1, 2014
  • Latest release: Jun 28, 2014
  • Number of updates: 21
  • Update frequency: every 2.8 days
  • Top authors: ayoubmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,100 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼2.53MB] [CPU: ▼349.45ms] Passed 4 tests

Analyzing server-side resources used by AM YouTube it
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼1.685.15 ▼50.56
Dashboard /wp-admin1.86 ▼1.553.60 ▼30.64
Posts /wp-admin/edit.php1.86 ▼1.783.43 ▼31.70
Add New Post /wp-admin/post-new.php1.86 ▼5.114.19 ▼1,284.89
Media Library /wp-admin/upload.php1.86 ▼1.443.35 ▼21.52

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by AM YouTube it
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,915 ▲16116.54 ▲0.878.70 ▲2.902.74 ▲0.45
Dashboard /wp-admin2,892 ▲316.13 ▲0.02117.73 ▼19.63155.39 ▼14.55
Posts /wp-admin/edit.php2,698 ▲73.36 ▲0.1363.24 ▲0.08139.84 ▼13.80
Add New Post /wp-admin/post-new.php1,668 ▼8419.00 ▼2.87399.69 ▼36.61153.22 ▼6.01
Media Library /wp-admin/upload.php1,705 ▲75.52 ▲0.02151.31 ▲7.74185.42 ▲0.52

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the thickbox handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/am-youtube-it/am-youtube-it.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Click on YouTube button.), #2 (Copy YouTube video link from YouTube.com and paste it here.), #3 (Select video size and what you want to instert then click on insert.), #4 (This is the results.)
You can look at the official readme.txt

am-youtube-it/am-youtube-it.php Passed 13 tests

This is the main PHP file of "AM YouTube it" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
113 characters long description:
To start using AM YouTube it plugin click on new post, click inside text box to get focused then on YouTube icon.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin365 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
HTML2290339
PHP191626

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
button.png3.35KB0.48KB▼ 85.70%