73% lktags-linkedin-insight-tags

Code Review | Add Linkedin insight tags for Linkedin ads

WordPress plugin Add Linkedin insight tags for Linkedin ads scored73%from 54 tests.

About plugin

  • Plugin page: lktags-linkedin-i...
  • Plugin version: 1.2.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Mar 3, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 40
  • Update frequency: every 40.9 days
  • Top authors: pagup (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

5,000+ active /44,125 total downloads

Benchmarks

Plugin footprint 65% 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: ▲5.43MB] [CPU: ▲24.82ms] 75% from 4 tests

An overview of server-side resources used by Add Linkedin insight tags for Linkedin ads
Please have a look at the following items
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.43MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.26 ▲5.8068.69 ▲24.44
Dashboard /wp-admin9.28 ▲5.9877.08 ▲16.48
Posts /wp-admin/edit.php9.28 ▲5.9390.49 ▲36.52
Add New Post /wp-admin/post-new.php9.89 ▲4.00123.18 ▲25.53
Media Library /wp-admin/upload.php9.28 ▲6.0570.15 ▲32.82
Linkedin Insight Tag /wp-admin/options-general.php?page=lktags9.2866.47
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2863.89

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 268 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
fs_debug_mode
fs_accounts
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
fs_active_plugins

Browser metrics Passed 4 tests

A check of browser resources used by Add Linkedin insight tags for Linkedin ads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.76 ▲0.011.60 ▲0.0133.43 ▼11.36
Dashboard /wp-admin2,221 ▲445.66 ▲0.0190.64 ▲0.1454.08 ▲13.21
Posts /wp-admin/edit.php2,133 ▲332.01 ▼0.0236.53 ▼5.7249.41 ▲9.30
Add New Post /wp-admin/post-new.php1,544 ▲1623.20 ▲0.38668.36 ▼5.2469.33 ▲19.72
Media Library /wp-admin/upload.php1,426 ▲264.18 ▼0.02110.89 ▲10.8660.95 ▲14.76
Linkedin Insight Tag /wp-admin/options-general.php?page=lktags1,2971.8226.8383.08
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0971.7026.8142.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/lktags-linkedin-insight-tags/vendor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • fs_active_plugins
    • db_upgraded
    • widget_recent-comments
    • fs_debug_mode
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • fs_accounts
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Pagup\\Lktags\\Core\\Plugin' not found in wp-content/plugins/lktags-linkedin-insight-tags/admin/views/settings.view.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Pagup\\Lktags\\Core\\Plugin' not found in wp-content/plugins/lktags-linkedin-insight-tags/admin/views/faq.view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/lktags-linkedin-insight-tags/admin/views/inc/top.view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lktags-linkedin-insight-tags/admin/views/inc/side.view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/lktags-linkedin-insight-tags/admin/views/metabox.view.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Pagup\\Lktags\\Controllers\\SettingsController' not found in wp-content/plugins/lktags-linkedin-insight-tags/admin/Settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/lktags-linkedin-insight-tags/admin/views/notices/support.view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Pagup\\Lktags\\Controllers\\add_action() in wp-content/plugins/lktags-linkedin-insight-tags/admin/controllers/TrackingController.php:10

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: linkedin woocommerce, linkedin insight tag, linkedin tag, linkedin advertising, linkedin ads

lktags-linkedin-insight-tags/lktags-linkedin-insight-tags.php 92% from 13 tests

"Add Linkedin insight tags for Linkedin ads" version 1.2.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 165 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected56,640 lines of code in 210 files:
LanguageFilesBlank linesComment linesLines of code
PHP1438,30717,53634,774
PO File198,0959,73518,634
Sass28399772,515
CSS149213472
JavaScript54262237
JSON1008

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity73.66
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes62
▷ Abstract classes23.23%
▷ Concrete classes6096.77%
▷ Final classes00.00%
Methods1,320
▷ Static methods22016.67%
▷ Public methods92870.30%
▷ Protected methods191.44%
▷ Private methods37328.26%
Functions105
▷ Named functions10398.10%
▷ Anonymous functions21.90%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.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
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
vendor/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/assets/imgs/meta-box.png117.29KB34.42KB▼ 70.66%