84% spotify-play-button

Code Review | Spotify Play Button

WordPress plugin Spotify Play Button scored84%from 54 tests.

About plugin

  • Plugin page: spotify-play-button
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2012
  • Latest release: Apr 12, 2012
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: wolfiezero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,234 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.68ms] Passed 4 tests

Server-side resources used by Spotify Play Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0051.00 ▲6.12
Dashboard /wp-admin3.31 ▲0.0147.88 ▼3.33
Posts /wp-admin/edit.php3.36 ▲0.0050.55 ▼3.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0093.00 ▼13.99
Media Library /wp-admin/upload.php3.24 ▲0.0037.72 ▲1.65

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Spotify Play Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.82 ▲0.1037.24 ▼7.87
Dashboard /wp-admin2,198 ▲185.59 ▼0.0291.94 ▼1.7041.94 ▼2.35
Posts /wp-admin/edit.php2,097 ▼31.98 ▲0.0239.01 ▲1.0934.85 ▼2.27
Add New Post /wp-admin/post-new.php1,528 ▼022.91 ▼0.42658.33 ▼10.2256.72 ▲0.92
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0198.16 ▼19.4743.24 ▼4.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/spotify-play-button/spotify-play-button.php:11

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: play button, music, spotify

spotify-play-button/spotify-play-button.php Passed 13 tests

The main PHP script in "Spotify Play Button" version 1.0 is automatically included on every request by WordPress
57 characters long description:
Adds the Spotify Play Button to your post or page content

Code Analysis Passed 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
No dangerous file extensions were detected24 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112924

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin