84% embed-link

Code Review | Embed Link

WordPress plugin Embed Link scored84%from 54 tests.

About plugin

  • Plugin page: embed-link
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.0
  • WordPress version: 6.3.1
  • First release: Jan 5, 2021
  • Latest release: Feb 28, 2021
  • Number of updates: 9
  • Update frequency: every 6.0 days
  • Top authors: jamesdlow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /484 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.56MB] [CPU: ▼18.97ms] Passed 4 tests

Analyzing server-side resources used by Embed Link
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.16 ▲0.37
Dashboard /wp-admin3.41 ▲0.1146.06 ▼8.78
Posts /wp-admin/edit.php3.53 ▲0.1745.15 ▼5.97
Add New Post /wp-admin/post-new.php3.29 ▼2.6036.57 ▼58.54
Media Library /wp-admin/upload.php3.34 ▲0.1133.33 ▼2.60

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Embed Link
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲4913.58 ▼1.004.20 ▲2.1639.77 ▼1.65
Dashboard /wp-admin2,222 ▲334.89 ▼1.12110.30 ▲2.5041.73 ▼1.90
Posts /wp-admin/edit.php2,108 ▲222.04 ▼0.0139.52 ▼1.0834.35 ▼0.98
Add New Post /wp-admin/post-new.php1,555 ▲2219.09 ▼4.04616.49 ▼61.4353.30 ▼1.80
Media Library /wp-admin/upload.php1,407 ▲224.20 ▼0.0596.13 ▼42.3740.87 ▼16.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-link/embed-link.php:31

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: oembed, image, opengraph, post, page...

embed-link/embed-link.php Passed 13 tests

The primary PHP file in "Embed Link" version 1.0.4 is used by WordPress to initiate all plugin functionality
65 characters long description:
Embed any link in Wordpress using it's open graph thumbnail image

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin571 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23648549
CSS10922

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity31.33
▷ Minimum class complexity26.00
▷ Maximum class complexity41.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods46
▷ Static methods1328.26%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin