10% easy-soundcloud-shortcode

Code Review | Easy Soundcloud Shortcode

WordPress plugin Easy Soundcloud Shortcode scored10%from 54 tests.

About plugin

  • Plugin page: easy-soundcloud-s...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0
  • WordPress version: 6.3.1
  • First release: Oct 12, 2018
  • Latest release: Jan 17, 2020
  • Number of updates: 9
  • Update frequency: every 51.3 days
  • Top authors: itroz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,805 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/easy-soundcloud-shortcode/EasySoundcloudShortcode.php+39
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.94MB] [CPU: ▼53.86ms] Passed 4 tests

A check of server-side resources used by Easy Soundcloud Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.84 ▼30.95
Dashboard /wp-admin2.08 ▼1.275.35 ▼54.55
Posts /wp-admin/edit.php2.08 ▼1.285.33 ▼39.42
Add New Post /wp-admin/post-new.php2.08 ▼3.816.47 ▼90.53
Media Library /wp-admin/upload.php2.08 ▼1.155.56 ▼29.07

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Soundcloud Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.14 ▼0.441.81 ▼0.1544.16 ▲2.87
Dashboard /wp-admin2,195 ▲145.60 ▼0.1191.82 ▼7.9144.26 ▼0.80
Posts /wp-admin/edit.php2,097 ▼31.97 ▲0.0240.43 ▲3.8334.89 ▼0.74
Add New Post /wp-admin/post-new.php1,526 ▼223.22 ▲0.03612.33 ▼57.5657.61 ▲1.27
Media Library /wp-admin/upload.php1,397 ▼64.16 ▼0.0298.48 ▲4.8642.42 ▲0.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% 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 did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/easy-soundcloud-shortcode/EasySoundcloudShortcode.php+39
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-soundcloud-shortcode/admin/Description.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_oembed_add_provider() in wp-content/plugins/easy-soundcloud-shortcode/EasySoundcloudShortcode.php:14

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 93% from 29 tests

readme.txt Passed 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
6 plugin tags: soundcloud shortcode, podcast show, sound cloud, soundcloud, sound cloud shortcode...

easy-soundcloud-shortcode/EasySoundcloudShortcode.php 85% from 13 tests

Analyzing the main PHP file in "Easy Soundcloud Shortcode" version 0.1
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-soundcloud-shortcode.php" instead of "EasySoundcloudShortcode.php")

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
No dangerous file extensions were detected62 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP271148
JavaScript11114

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/tinyMCE/soundcloud.png17.90KB0.55KB▼ 96.90%