84% super-link-preview

Code Review | Super Link Preview

WordPress plugin Super Link Preview scored84%from 54 tests.

About plugin

  • Plugin page: super-link-preview
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 2, 2014
  • Latest release: Dec 4, 2014
  • Number of updates: 20
  • Update frequency: every 0.1 days
  • Top authors: daniele.perilli (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,991 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: ▼8.62ms] Passed 4 tests

Server-side resources used by Super Link Preview
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.84 ▼6.65
Dashboard /wp-admin3.33 ▲0.0343.94 ▼5.19
Posts /wp-admin/edit.php3.44 ▲0.0946.87 ▲1.49
Add New Post /wp-admin/post-new.php5.91 ▲0.0375.63 ▼23.60
Media Library /wp-admin/upload.php3.25 ▲0.0235.39 ▲0.98
Super Link Preview /wp-admin/options-general.php?page=super-link-preview3.2229.17

Server storage [IO: ▲0.02MB] [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: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Super Link Preview
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲13913.79 ▼0.597.85 ▲5.7240.48 ▼2.86
Dashboard /wp-admin2,210 ▲225.02 ▲0.12115.19 ▼0.3541.74 ▼3.92
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0639.55 ▲3.9634.38 ▼2.70
Add New Post /wp-admin/post-new.php1,517 ▼2917.68 ▼0.49595.56 ▼42.8052.92 ▼0.25
Media Library /wp-admin/upload.php1,389 ▲14.22 ▼0.05100.87 ▼4.3542.17 ▼0.64
Super Link Preview /wp-admin/options-general.php?page=super-link-preview8732.0628.0046.08

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
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/super-link-preview/super-link-preview.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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
Please fix the following attributes:
  • Tags: You are using too many tags: 26 tag instead of maximum 10
The official readme.txt might help

super-link-preview/super-link-preview.php Passed 13 tests

"Super Link Preview" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
109 characters long description:
Generate a preview (aka thumbnail) of any external link in the page, similar to Facebook or Google+ snippets.

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
Everything looks great! No dangerous files found in this plugin382 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP114176331
JavaScript24151

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1676.19%
▷ Protected methods00.00%
▷ Private methods523.81%
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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon@2x.png0.61KB0.39KB▼ 35.47%
images/icon.png0.38KB0.27KB▼ 26.82%