77% urlshortener-link-extractor

Code Review | Urlshortener Link Extractor

WordPress plugin Urlshortener Link Extractor scored77%from 54 tests.

About plugin

  • Plugin page: urlshortener-link...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: Sep 21, 2016
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: zerros24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /543 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.72ms] Passed 4 tests

A check of server-side resources used by Urlshortener Link Extractor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0248.34 ▼2.41
Dashboard /wp-admin3.38 ▼0.0150.21 ▼13.34
Posts /wp-admin/edit.php3.43 ▲0.0252.98 ▼0.41
Add New Post /wp-admin/post-new.php5.96 ▲0.0287.58 ▼14.73
Media Library /wp-admin/upload.php3.30 ▲0.0240.00 ▲4.81
Link Extractor /wp-admin/options-general.php?page=shortenurl_settings3.2632.69

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Urlshortener Link Extractor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.62 ▲0.271.81 ▼0.1443.96 ▼1.87
Dashboard /wp-admin2,199 ▲275.57 ▼0.1388.50 ▼18.9140.42 ▼4.87
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0736.07 ▼1.0533.46 ▼3.05
Add New Post /wp-admin/post-new.php1,534 ▲823.03 ▲0.01678.82 ▼10.2465.18 ▲4.91
Media Library /wp-admin/upload.php1,404 ▲44.18 ▲0.0197.61 ▼5.5141.54 ▼1.83
Link Extractor /wp-admin/options-general.php?page=shortenurl_settings8022.0025.7723.17

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=shortenurl_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=shortenurl_settings
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/urlshortener-link-extractor/UrlshortenerLinksExtractor.php:17

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 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #2 (banner-772—250.png), #3 (icon-128x128.png), #4 (banner-1544—500.png)
  • Donate link: Invalid URI ("NA")
Please take inspiration from this readme.txt

urlshortener-link-extractor/UrlshortenerLinksExtractor.php 85% from 13 tests

The entry point to "Urlshortener Link Extractor" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 198 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("urlshortener-link-extractor.php" instead of "UrlshortenerLinksExtractor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin94 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1191694

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.17KB9.70KB▼ 51.92%