84% kirilkirkov-spotify-search

Code Review | Search for Spotify

WordPress plugin Search for Spotify scored84%from 54 tests.

About plugin

  • Plugin page: kirilkirkov-spoti...
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Dec 30, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 8
  • Update frequency: every 11.4 days
  • Top authors: kirilkirkov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /376 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼9.19ms] Passed 4 tests

This is a short check of server-side resources used by Search for Spotify
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4540.88 ▼2.44
Dashboard /wp-admin3.75 ▲0.4152.17 ▼14.82
Posts /wp-admin/edit.php3.87 ▲0.5147.84 ▼8.51
Add New Post /wp-admin/post-new.php6.33 ▲0.4587.64 ▼11.00
Media Library /wp-admin/upload.php3.68 ▲0.4541.86 ▲5.80
Spotify Search /wp-admin/options-general.php?page=kirilkirkov-spotify-search-settings3.7434.30

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 196 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Search for Spotify: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲13313.80 ▼0.538.99 ▲7.2740.33 ▼2.16
Dashboard /wp-admin2,202 ▲255.61 ▲0.0989.80 ▼16.9839.26 ▼4.36
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0635.16 ▼5.3633.66 ▼2.60
Add New Post /wp-admin/post-new.php1,538 ▲118.34 ▲0.39633.41 ▲16.1369.21 ▼6.19
Media Library /wp-admin/upload.php1,407 ▲44.20 ▼0.0396.77 ▼0.9942.58 ▼5.40
Spotify Search /wp-admin/options-general.php?page=kirilkirkov-spotify-search-settings9802.0325.6940.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 49× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/kirilkirkov-spotify-search/Includes/Admin/SettingsForm.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/kirilkirkov-spotify-search/vendor/guzzlehttp/psr7/src/UploadedFile.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/kirilkirkov-spotify-search/Includes/Public/PublicSearchForm.php:4
    • > PHP Parse error
      syntax error, unexpected '|', expecting '{' in wp-content/plugins/kirilkirkov-spotify-search/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php on line 18
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/kirilkirkov-spotify-search/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/kirilkirkov-spotify-search/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/kirilkirkov-spotify-search/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/kirilkirkov-spotify-search/vendor/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/kirilkirkov-spotify-search/vendor/guzzlehttp/psr7/src/BufferStream.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/kirilkirkov-spotify-search/vendor/guzzlehttp/psr7/src/Request.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: spotify, spotify shortcode, spotify search, spotify widget

kirilkirkov-spotify-search/KirilKirkovSpotifySearch.php 92% from 13 tests

Analyzing the main PHP file in "Search for Spotify" version 1.3
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("kirilkirkov-spotify-search.php" instead of "KirilKirkovSpotifySearch.php")

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
There were no executable files found in this plugin33,924 lines of code in 181 files:
LanguageFilesBlank linesComment linesLines of code
PHP1472,4806,48328,610
Markdown131,12703,408
JSON900959
CSS38514490
JavaScript22924347
YAML522391
Dockerfile18010
make1409

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity15.42
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces16
Interfaces15
Traits2
Classes99
▷ Abstract classes00.00%
▷ Concrete classes99100.00%
▷ Final classes2323.23%
Methods875
▷ Static methods23026.29%
▷ Public methods70981.03%
▷ Protected methods40.46%
▷ Private methods16218.51%
Functions164
▷ Named functions7445.12%
▷ Anonymous functions9054.88%
Constants258
▷ Global constants7629.46%
▷ Class constants18270.54%
▷ Public constants182100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Includes/Admin/Assets/Img/274x300.png50.52KB15.76KB▼ 68.80%
Includes/Admin/GitHub-Mark-64px.png2.56KB1.51KB▼ 41.07%