84% soundcloud-shortcode

Code Review | SoundCloud Shortcode

WordPress plugin SoundCloud Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: soundcloud-shortcode
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Jul 10, 2009
  • Latest release: May 4, 2023
  • Number of updates: 61
  • Update frequency: every 82.7 days
  • Top authors: por_ (65.57%)jowagener (34.43%)indextwo (3.28%)

Code review

54 tests

User reviews

23 reviews

Install metrics

8,000+ active /398,069 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.69ms] Passed 4 tests

This is a short check of server-side resources used by SoundCloud Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.75 ▼1.56
Dashboard /wp-admin3.31 ▲0.0145.36 ▼2.05
Posts /wp-admin/edit.php3.37 ▲0.0149.91 ▲2.72
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.46 ▼5.14
Media Library /wp-admin/upload.php3.24 ▲0.0137.27 ▲2.00
SoundCloud /wp-admin/options-general.php?page=soundcloud-shortcode3.2033.88

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

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

Browser metrics Passed 4 tests

SoundCloud Shortcode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.24 ▼0.121.73 ▼0.3345.29 ▼3.52
Dashboard /wp-admin2,202 ▲225.63 ▼0.0290.66 ▲1.6240.37 ▲0.07
Posts /wp-admin/edit.php2,101 ▲12.01 ▲0.0738.70 ▲2.8235.45 ▼0.82
Add New Post /wp-admin/post-new.php1,529 ▲323.34 ▼0.19654.42 ▲0.4854.63 ▲3.17
Media Library /wp-admin/upload.php1,404 ▲74.22 ▲0.0798.52 ▼2.3939.87 ▼1.79
SoundCloud /wp-admin/options-general.php?page=soundcloud-shortcode9362.0424.4426.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(./soundcloud-shortcode.php): failed to open stream: No such file or directory in wp-content/plugins/soundcloud-shortcode/tests/soundcloud-shortcode-test.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_oembed_add_provider() in wp-content/plugins/soundcloud-shortcode/soundcloud-shortcode.php:39
    • > PHP Fatal error
      require_once(): Failed opening required './soundcloud-shortcode.php' (include_path='.:/usr/share/php') in wp-content/plugins/soundcloud-shortcode/tests/soundcloud-shortcode-test.php on line 30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: shortcode, soundcloud

soundcloud-shortcode/soundcloud-shortcode.php 92% from 13 tests

The main PHP script in "SoundCloud Shortcode" version 3.1.0 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin389 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2117110352
Markdown121020
XML11017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.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
There are no PNG files in this plugin