83% social-influencer-links

Code Review | Social Influencer Links

WordPress plugin Social Influencer Links scored83%from 54 tests.

About plugin

  • Plugin page: social-influencer...
  • Plugin version: 0.2.6
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 9, 2020
  • Latest release: Jul 31, 2023
  • Number of updates: 17
  • Update frequency: every 56.7 days
  • Top authors: wpmaintainer (94.12%)theandystratton (11.76%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /740 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Social Influencer Links
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.47 ▲1.0143.04 ▲1.94
Dashboard /wp-admin4.33 ▲0.9853.01 ▼3.89
Posts /wp-admin/edit.php4.44 ▲1.0946.24 ▼2.75
Add New Post /wp-admin/post-new.php7.01 ▲1.1393.50 ▲2.45
Media Library /wp-admin/upload.php4.33 ▲1.1040.70 ▲10.60
Add New Link /wp-admin/post-new.php?post_type=wpm-landing-link4.5255.07
Influencer Links /wp-admin/edit.php?post_type=wpm-landing-link4.2936.64

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 245 new files
Database: no new tables, 7 new options
New WordPress options
acf_version
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Influencer Links
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.35 ▼0.021.82 ▲0.1443.82 ▲2.29
Dashboard /wp-admin2,218 ▲415.60 ▼0.0898.19 ▲6.3844.41 ▲7.81
Posts /wp-admin/edit.php2,129 ▲262.02 ▲0.0136.98 ▼2.9033.91 ▼2.41
Add New Post /wp-admin/post-new.php6,689 ▲5,15124.47 ▲1.231,034.30 ▲443.1447.62 ▼6.45
Media Library /wp-admin/upload.php1,967 ▲5678.30 ▲4.11211.36 ▲113.0351.25 ▲6.55
Add New Link /wp-admin/post-new.php?post_type=wpm-landing-link2,4538.20183.9345.93
Influencer Links /wp-admin/edit.php?post_type=wpm-landing-link1,0981.9833.4131.02

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: 7 options
    • widget_recent-comments
    • acf_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 76× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/social-influencer-links/lib/acf/includes/admin/views/html-admin-page-upgrade.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_render_field_wrap() in wp-content/plugins/social-influencer-links/lib/acf/includes/admin/views/field-group-options.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/social-influencer-links/lib/acf/includes/fields/class-acf-field-group.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/social-influencer-links/lib/acf/includes/admin/views/html-location-group.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/social-influencer-links/lib/acf/includes/acf-field-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/social-influencer-links/lib/acf/includes/l10n.php:153
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-influencer-links/lib/acf/includes/forms/form-widget.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'ACF_Field' not found in wp-content/plugins/social-influencer-links/lib/acf/includes/fields/class-acf-field-user.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/social-influencer-links/lib/acf/includes/acf-value-functions.php:4
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/social-influencer-links/lib/acf/includes/admin/views/html-location-rule.php on line 4

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Creating your page with Gutenberg.), #2 (Creating your page with the Classic Editor.), #3 (Example page with a light theme.), #4 (Example page with a dark theme.)
You can take inspiration from this readme.txt

social-influencer-links/index.php 92% from 13 tests

The main PHP file in "Social Influencer Links" ver. 0.2.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("social-influencer-links.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin89,812 lines of code in 197 files:
LanguageFilesBlank linesComment linesLines of code
PO File3123,63339,88649,083
JavaScript146,7216,68722,545
PHP1369,69017,50715,975
CSS12209601,646
JSON200497
SVG10152
Markdown111014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.84
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes101
▷ Abstract classes21.98%
▷ Concrete classes9998.02%
▷ Final classes00.00%
Methods677
▷ Static methods40.59%
▷ Public methods67599.70%
▷ Protected methods00.00%
▷ Private methods20.30%
Functions432
▷ Named functions42899.07%
▷ Anonymous functions40.93%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.75MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/acf/assets/inc/datepicker/images/ui-bg_highlight-soft_0_ffffff_1x100.png0.08KB0.08KB0.00%
lib/acf/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%
screenshot-2.png302.35KB94.14KB▼ 68.86%
lib/acf/assets/images/acf-logo.png3.40KB3.39KB0.23%
screenshot-4.png98.74KB30.20KB▼ 69.42%