78% linkedinclude

Code Review | LinkedInclude

WordPress plugin LinkedInclude scored 78% from 54 tests.

About plugin

  • Plugin page: linkedinclude
  • Plugin version: 3.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-5.7.2
  • WordPress version: 5.8.1
  • First release: May 20, 2015
  • Latest release: Sep 7, 2021
  • Number of updates: 21
  • Update frequency: every 109.6 days
  • Top authors: era404 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

90+ active / 3,110 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 gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼140.99ms] Passed 4 tests

A check of server-side resources used by LinkedInclude
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2339.42 ▲14.13
Dashboard /wp-admin3.17 ▲0.1244.73 ▼1.99
Posts /wp-admin/edit.php3.22 ▲0.1148.84 ▼2.31
Add New Post /wp-admin/post-new.php5.53 ▲0.1098.56 ▼563.28
Media Library /wp-admin/upload.php3.11 ▲0.1138.04 ▲3.61
LinkedInclude /wp-admin/tools.php?page=linkedinclude3.0935.39

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 140 new files
Database: 1 new table, 1 new option
New tables
wp_linkedinclude_posts
New WordPress options
widget_linkedinclude_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for LinkedInclude
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲11915.98 ▲0.068.13 ▼1.2951.62 ▲3.75
Dashboard /wp-admin2,981 ▲506.01 ▲0.04149.95 ▲5.23114.75 ▲2.80
Posts /wp-admin/edit.php2,749 ▲102.83 ▲0.0269.20 ▼1.0992.54 ▲0.03
Add New Post /wp-admin/post-new.php1,589 ▼2620.96 ▼0.43381.76 ▲115.78116.16 ▲3.19
Media Library /wp-admin/upload.php1,817 ▲135.04 ▲0.03161.90 ▼5.37124.48 ▼2.56
LinkedInclude /wp-admin/tools.php?page=linkedinclude1,2582.2458.55102.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_linkedinclude_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/linkedinclude/vendor/pharse/examples/bbc_rss.php
    • > /wp-content/plugins/linkedinclude/vendor/pharse/examples/rss2array.php
    • > /wp-content/plugins/linkedinclude/vendor/pharse/examples/google.php
    • > /wp-content/plugins/linkedinclude/vendor/pharse/examples/formatter.php
    • > /wp-content/plugins/linkedinclude/vendor/pharse/examples/utf8.php
  • 47× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/linkedinclude/vendor/guzzlehttp/psr7/src/FnStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/linkedinclude/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/linkedinclude/vendor/guzzlehttp/psr7/src/Stream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/linkedinclude/vendor/guzzlehttp/psr7/src/MultipartStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/linkedinclude/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/linkedinclude/vendor/guzzlehttp/promises/src/RejectedPromise.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/linkedinclude/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/linkedinclude/linkedinclude_setup.php:72
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/linkedinclude/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/linkedinclude/vendor/guzzlehttp/promises/src/Promise.php:9

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: linkedin

linkedinclude/linkedinclude.php Passed 13 tests

The main file in "LinkedInclude" v. 3.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
29 characters long description:
Article Importer for LinkedIn

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin17,113 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1072,5947,03113,233
Markdown1095203,193
JSON600405
CSS2012218
JavaScript171345
HTML10010
make1409

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 155)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity21.98
▷ Minimum class complexity1.00
▷ Maximum class complexity269.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity155.00
Code structure
Namespaces8
Interfaces14
Traits2
Classes87
▷ Abstract classes00.00%
▷ Concrete classes87100.00%
▷ Final classes78.05%
Methods906
▷ Static methods697.62%
▷ Public methods67774.72%
▷ Protected methods10912.03%
▷ Private methods12013.25%
Functions157
▷ Named functions7044.59%
▷ Anonymous functions8755.41%
Constants198
▷ Global constants9950.00%
▷ Class constants9950.00%
▷ Public constants99100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/paypal.png4.58KB2.06KB▼ 54.95%
img/hide.png1.15KB0.31KB▼ 72.91%
img/show.png1.29KB0.47KB▼ 63.40%
img/bulcclub.png2.74KB1.77KB▼ 35.19%