62% master-link

Code Review | Master Link

WordPress plugin Master Link scored62%from 54 tests.

About plugin

  • Plugin page: master-link
  • Plugin version: 0.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-5.5.0
  • WordPress version: 6.3.1
  • First release: May 20, 2016
  • Latest release: Sep 1, 2020
  • Number of updates: 23
  • Update frequency: every 68.0 days
  • Top authors: Ruxton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,564 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.68MB] [CPU: ▼25.27ms] Passed 4 tests

Server-side resources used by Master Link
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1946.06 ▲8.73
Dashboard /wp-admin3.26 ▼0.0435.64 ▼11.48
Posts /wp-admin/edit.php3.27 ▼0.0933.66 ▼18.67
Add New Post /wp-admin/post-new.php3.26 ▼2.6333.99 ▼70.37
Media Library /wp-admin/upload.php3.26 ▲0.0332.86 ▼0.57
Add New /wp-admin/post-new.php?post_type=master_link3.2733.60
Master Link Plugin /wp-admin/options-general.php?page=master_link_plugin3.2732.19
All Master Links /wp-admin/edit.php?post_type=master_link3.2733.45

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 129 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Master Link
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲18614.17 ▼0.348.91 ▲7.0737.72 ▼10.00
Dashboard /wp-admin2,242 ▲575.89 ▲0.0799.65 ▼5.1240.28 ▼1.86
Posts /wp-admin/edit.php2,125 ▲362.03 ▲0.0340.88 ▲0.5334.37 ▼1.91
Add New Post /wp-admin/post-new.php1,565 ▲3218.65 ▼4.39613.21 ▼72.9557.68 ▼5.73
Media Library /wp-admin/upload.php1,421 ▲334.27 ▲0.0096.58 ▼12.0543.16 ▼0.40
Add New /wp-admin/post-new.php?post_type=master_link2,4957.64172.6773.42
Master Link Plugin /wp-admin/options-general.php?page=master_link_plugin8421.7124.6029.29
All Master Links /wp-admin/edit.php?post_type=master_link1,0951.9632.0331.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/master-link/settings.php+34
    Use of undefined constant Hum - assumed 'Hum' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=master_link
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/master-link/settings.php+34
    Use of undefined constant Hum - assumed 'Hum' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-ios_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-play_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-steam_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-itch.io_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-amazon_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-soundcloud_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-itunes_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-applemusic_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-spotify_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-guvera_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-deezer_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-bandcamp_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-unearthed_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-youtube_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-playmusic_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-tidal_link_id
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+254
    Undefined index: master_link_plugin-other_link_id
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/templates/metabox_row.php+19
    Undefined variable: service_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/templates/metabox_row.php+6
    Undefined index: validation
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/templates/metabox_row.php+7
    Undefined index: validation-error
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/templates/metabox_row.php+19
    Undefined variable: value
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/templates/metabox_row.php+16
    Undefined variable: validation
    • > GET request to /wp-admin/post-new.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/templates/metabox_row.php+17
    Undefined variable: validation_error
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=master_link
    • > Notice in wp-content/plugins/master-link/master-link.php+311
    Trying to get property 'post_type' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/master-link/vendor/jwilsson/spotify-web-api-php/phpunit.php
    • > /wp-content/plugins/master-link/public_templates/service.php
  • 35× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'MasterLinkIFinder' not found in wp-content/plugins/master-link/finders/deezer.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'MasterLinkIFinder' not found in wp-content/plugins/master-link/finders/spotify.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/master-link/public_templates/service.php on line 5
    • > PHP Notice
      Undefined variable: service in wp-content/plugins/master-link/public_templates/service.php on line 14
    • > PHP Notice
      Undefined variable: service in wp-content/plugins/master-link/public_templates/service.php on line 7
    • > PHP Fatal error
      Uncaught Error: Interface 'MasterLinkIFinder' not found in wp-content/plugins/master-link/finders/tidal.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/master-link/templates/metabox.php:2
    • > PHP Notice
      Undefined variable: wp_master_link in wp-content/plugins/master-link/public_templates/service.php on line 5
    • > PHP Notice
      Trying to get property 'services' of non-object in wp-content/plugins/master-link/public_templates/service.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/master-link/public_templates/service.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

master-link/master-link.php Passed 13 tests

The main PHP script in "Master Link" version 0.4.1 is automatically included on every request by WordPress
58 characters long description:
Create a page that links users to multiple remote services

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
Everything looks great! No dangerous files found in this plugin45,743 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
JSON420035,195
PHP281,1711,2214,522
Markdown221,36002,069
SVG155101,755
JavaScript36432571,616
CSS2102223
Sass280190
CoffeeScript2218110
XML25033
YAML19030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods288
▷ Static methods51.74%
▷ Public methods27194.10%
▷ Protected methods51.74%
▷ Private methods124.17%
Functions9
▷ Named functions444.44%
▷ Anonymous functions555.56%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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 images were found in this plugin