89% linkpreview

Code Review | Phee's LinkPreview

WordPress plugin Phee's LinkPreview scored89%from 54 tests.

About plugin

  • Plugin page: linkpreview
  • Plugin version: 1.6.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.5
  • WordPress version: 6.3.1
  • First release: Mar 11, 2015
  • Latest release: Apr 25, 2018
  • Number of updates: 57
  • Update frequency: every 20.0 days
  • Top authors: filipstepanov (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

800+ active /4,151 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.30ms] Passed 4 tests

Analyzing server-side resources used by Phee's LinkPreview
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.0648.67 ▲2.61
Dashboard /wp-admin3.62 ▲0.0552.77 ▼2.81
Posts /wp-admin/edit.php3.73 ▲0.0550.96 ▼2.98
Add New Post /wp-admin/post-new.php6.20 ▲0.0588.16 ▼14.98
Media Library /wp-admin/upload.php3.54 ▲0.0539.07 ▼0.43
Link Preview /wp-admin/options-general.php?page=link-preview3.5238.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
linkpreview_settings
can_compress_scripts
db_upgraded
linkpreview_firsttime_setup
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Phee's LinkPreview
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲12413.51 ▼0.7610.06 ▲7.9346.76 ▲2.72
Dashboard /wp-admin2,201 ▲305.61 ▼0.0889.05 ▼31.7641.95 ▼5.73
Posts /wp-admin/edit.php2,106 ▲62.00 ▼0.0035.37 ▼5.0434.96 ▼3.98
Add New Post /wp-admin/post-new.php1,549 ▲1823.44 ▲0.35719.42 ▲108.1454.37 ▼5.98
Media Library /wp-admin/upload.php1,409 ▲64.20 ▼0.03101.15 ▲2.7350.01 ▲6.67
Link Preview /wp-admin/options-general.php?page=link-preview1,1652.2029.1741.25

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 uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Donate link: Invalid URI ("")
  • Screenshots: Please a description for screenshot #3 in linkpreview/assets to your readme.txt
You can look at the official readme.txt

linkpreview/linkpreview.php Passed 13 tests

The entry point to "Phee's LinkPreview" version 1.6.7 is a PHP file that has certain tags in its header comment area
89 characters long description:
Link preview web service with basic link information (favicon, title, image, description)

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
Everything looks great! No dangerous files found in this plugin1,027 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP112863527
CSS103424499
JavaScript1001

PHP code Passed 2 tests

Analyzing 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.40
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity4.57
▷ Minimum method complexity3.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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
images/favicon-32x32.png2.56KB1.48KB▼ 42.30%