83% grab-latest-track-from-soundcloud

Code Review | Grab Latest Track From SoundCloud

WordPress plugin Grab Latest Track From SoundCloud scored83%from 54 tests.

About plugin

  • Plugin page: grab-latest-track...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.8
  • WordPress version: 6.3.1
  • First release: Aug 2, 2021
  • Latest release: Aug 2, 2021
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: dmiyares (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /369 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Grab Latest Track From SoundCloud
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.29 ▼5.12
Dashboard /wp-admin3.32 ▼0.0345.29 ▼19.80
Posts /wp-admin/edit.php3.37 ▲0.0146.98 ▼7.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.11 ▼8.25
Media Library /wp-admin/upload.php3.24 ▲0.0136.11 ▼3.30

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Grab Latest Track From SoundCloud
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.101.61 ▼0.1542.93 ▼2.63
Dashboard /wp-admin2,198 ▲245.57 ▼0.1984.51 ▼16.7539.45 ▼2.65
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0240.71 ▲4.4537.70 ▲2.29
Add New Post /wp-admin/post-new.php1,535 ▲623.24 ▲0.16596.47 ▼27.1548.73 ▲1.04
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.0798.74 ▼7.8442.21 ▼3.35

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_wtwh_soundcloud_widget
    • widget_theysaidso_widget

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 no errors were found, 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/grab-latest-track-from-soundcloud/index.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin widget dialogue box showing customization fields), #2 (Example of how widget looks on front end in right rail)
You can take inspiration from this readme.txt

grab-latest-track-from-soundcloud/index.php 85% from 13 tests

"Grab Latest Track From SoundCloud" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("grab-latest-track-from-soundcloud.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)

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
Success! There were no dangerous files found in this plugin178 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19734138
Markdown118040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.29MB with 0.19MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png251.77KB82.39KB▼ 67.27%
screenshot-1.png46.88KB16.39KB▼ 65.03%