72% yame-linkinbio

Code Review | Yame | Link In Bio

WordPress plugin Yame | Link In Bio scored72%from 54 tests.

About plugin

  • Plugin page: yame-linkinbio
  • Plugin version: 0.9.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 2, 2019
  • Latest release: Oct 2, 2019
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: Yame (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /525 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.53MB] [CPU: ▼15.07ms] Passed 4 tests

A check of server-side resources used by Yame | Link In Bio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1443.30 ▲4.18
Dashboard /wp-admin3.50 ▲0.2048.92 ▼0.04
Posts /wp-admin/edit.php3.55 ▲0.2050.69 ▼4.13
Add New Post /wp-admin/post-new.php3.31 ▼2.5739.42 ▼60.27
Media Library /wp-admin/upload.php3.36 ▲0.1341.27 ▲7.04
LinkInBio /wp-admin/options-general.php?page=linkinbio3.3531.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Yame | Link In Bio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲20114.36 ▼0.325.92 ▲3.9442.25 ▼6.59
Dashboard /wp-admin2,234 ▲465.70 ▲0.84117.67 ▲11.2638.07 ▼5.82
Posts /wp-admin/edit.php2,120 ▲312.60 ▲0.5445.18 ▲9.5630.77 ▼0.50
Add New Post /wp-admin/post-new.php1,694 ▲15120.17 ▲2.09675.10 ▲45.0043.35 ▼8.74
Media Library /wp-admin/upload.php1,416 ▲284.98 ▲0.73107.04 ▲8.6740.97 ▼3.98
LinkInBio /wp-admin/options-general.php?page=linkinbio1,0872.6249.5940.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 10× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/SyntaxChecker.test.php
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/issues/Github-560.test.php
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/Autoload.test.php
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/examples/phpinfo.php
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/issues/Github-392.test.php
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/bin/ci/run_tests.php
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/ReadWriteOperations.test.php
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/issues/Github-373.test.php
    • > /wp-content/plugins/yame-linkinbio/public/partials/linkinbio-public-display.php
    • > /wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/examples/index.php
  • 414× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/yame-linkinbio/vendor/predis/predis/src/Command/ConnectionSelect.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'phpFastCache\\Cache\\ExtendedCacheItemInterface' not found in wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/src/phpFastCache/Drivers/Mongodb/Item.php:26
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/AttachingDetachingMethods.test.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\SetIntersection' not found in wp-content/plugins/yame-linkinbio/vendor/predis/predis/src/Command/SetDifference.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/yame-linkinbio/vendor/predis/predis/src/Command/KeyMove.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/yame-linkinbio/vendor/predis/predis/src/Command/ConnectionQuit.php:19
    • > PHP Warning
      require(wp-content/plugins/yame-linkinbio/vendor/raiym/instagram-php-scraper/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/yame-linkinbio/vendor/raiym/instagram-php-scraper/examples/likeAndUnlikeMedia.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/issues/../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/yame-linkinbio/vendor/phpfastcache/phpfastcache/tests/issues/Github-529.test.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\GeospatialGeoRadius' not found in wp-content/plugins/yame-linkinbio/vendor/predis/predis/src/Command/GeospatialGeoRadiusByMember.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'InstagramScraper\\Model\\AbstractModel' not found in wp-content/plugins/yame-linkinbio/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Model/Account.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=linkinbio
    • > Network (severe)
    wp-json/linkinbio/v1/insta/ - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=linkinbio
    • > Network (severe)
    wp-json/linkinbio/v1/links - Failed to load resource: the server responded with a status of 404 (Not Found)

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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Settings dashboard with Vuejs), #2 (Front-end view)
You can look at the official readme.txt

yame-linkinbio/linkinbio.php 92% from 13 tests

"Yame | Link In Bio" version 0.9.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yame-linkinbio.php" instead of "linkinbio.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin171,909 lines of code in 897 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31418,71518,176112,913
CSS38,56322026,586
PHP4745,71716,09921,452
Markdown431,89105,415
HTML1046252,697
JSON27002,045
TypeScript88519534
YAML72023148
make418451
INI26725
XML22025
Bourne Shell33018

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.33
▷ Minimum class complexity1.00
▷ Maximum class complexity198.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces62
Interfaces36
Traits9
Classes354
▷ Abstract classes133.67%
▷ Concrete classes34196.33%
▷ Final classes10.29%
Methods1,835
▷ Static methods1417.68%
▷ Public methods1,42777.77%
▷ Protected methods33718.37%
▷ Private methods713.87%
Functions36
▷ Named functions1233.33%
▷ Anonymous functions2466.67%
Constants135
▷ Global constants1511.11%
▷ Class constants12088.89%
▷ Public constants120100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected