73% auto-replace-broken-links-for-youtube

Code Review | Auto Replace Broken Links For Youtube

WordPress plugin Auto Replace Broken Links For Youtube scored73%from 54 tests.

About plugin

  • Plugin page: auto-replace-brok...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6 or later+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 7, 2023
  • Latest release: Aug 16, 2023
  • Number of updates: 27
  • Update frequency: every 6.0 days
  • Top authors: antoniolamorgese (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /348 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Auto Replace Broken Links For Youtube
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.95 ▲5.30
Dashboard /wp-admin3.32 ▲0.0244.61 ▼2.92
Posts /wp-admin/edit.php3.38 ▲0.0242.82 ▼1.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.49 ▼8.15
Media Library /wp-admin/upload.php3.25 ▲0.0233.65 ▼1.51
Auto Replace Broken Links For Youtube /wp-admin/options-general.php?page=auto-replace-broken-links-for-youtube3.2132.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: 1 new table, 6 new options
New tables
wp_auto_replace_broken_links_for_youtube
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Auto Replace Broken Links For Youtube
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.26 ▼0.382.32 ▲0.6443.51 ▲0.56
Dashboard /wp-admin2,213 ▲365.60 ▼0.0585.36 ▲0.2538.68 ▼6.69
Posts /wp-admin/edit.php2,118 ▲182.03 ▲0.0238.38 ▲3.6438.22 ▲0.43
Add New Post /wp-admin/post-new.php1,556 ▲3023.09 ▼0.61674.21 ▼20.5764.06 ▼0.47
Media Library /wp-admin/upload.php1,421 ▲244.19 ▼0.01100.16 ▲0.3646.80 ▲1.94
Auto Replace Broken Links For Youtube /wp-admin/options-general.php?page=auto-replace-broken-links-for-youtube8762.1728.1629.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/auto-replace-broken-links-for-youtube/auto-replace-broken-links-for-youtube.php+417
    Undefined variable: plugin_folder_name
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/auto-replace-broken-links-for-youtube/admin/auto-replace-broken-links-for-youtube-admin.php:127

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: external link, broken link, links, internal link, broken link youtube

auto-replace-broken-links-for-youtube/auto-replace-broken-links-for-youtube.php 77% from 13 tests

"Auto Replace Broken Links For Youtube" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 369 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.3" instead of "5.6")
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "5.6 or later")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin782 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PO File5170180405
PHP451164377

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.49MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/screenshot-1-mobile-device.png57.05KB18.87KB▼ 66.92%
assets/banner-1544x500.png45.56KB16.21KB▼ 64.43%
assets/screenshot-1.png74.30KB32.11KB▼ 56.78%
assets/banner-772x250.png35.34KB11.42KB▼ 67.69%
admin/assets/screenshot-1-desktop-device.png153.57KB48.72KB▼ 68.27%