94% elink-embed-content

Code Review | elink - Embed Content

WordPress plugin elink - Embed Content scored 94% from 54 tests.

About plugin

  • Plugin page: elink-embed-content
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 5.8.1
  • First release: May 3, 2019
  • Latest release: Nov 25, 2020
  • Number of updates: 5
  • Update frequency: every 114.4 days
  • Top authors: elinkcontent (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active / 2,897 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼143.60ms] Passed 4 tests

This is a short check of server-side resources used by elink - Embed Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0335.95 ▲1.97
Dashboard /wp-admin3.08 ▲0.0350.47 ▼0.15
Posts /wp-admin/edit.php3.14 ▲0.0337.35 ▼13.59
Add New Post /wp-admin/post-new.php5.43 ▲0.0095.13 ▼561.08
Media Library /wp-admin/upload.php3.03 ▲0.0238.09 ▲0.41

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for elink - Embed Content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲10615.90 ▲0.379.01 ▲1.3551.16 ▲3.73
Dashboard /wp-admin2,973 ▲395.89 ▼0.00146.51 ▼4.52126.88 ▲6.55
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0268.67 ▼10.1994.36 ▼4.41
Add New Post /wp-admin/post-new.php1,510 ▲1218.57 ▼0.33393.08 ▼7.40144.10 ▲22.35
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.02156.30 ▲0.05127.57 ▲3.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 | 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/elink-embed-content/inc/shortcode.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elink-embed-content/inc/block.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

elink-embed-content/elink-embed.php 92% from 13 tests

This is the main PHP file of "elink - Embed Content" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("elink-embed-content.php" instead of "elink-embed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected272 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP427129166
JavaScript21587106

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.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
PNG images were not found in this plugin