48% soundcloud-sound-competition

Code Review | SoundCloud Sound Competition

WordPress plugin SoundCloud Sound Competition scored48%from 54 tests.

About plugin

  • Plugin page: soundcloud-sound-...
  • Plugin version: 1.1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Oct 1, 2012
  • Latest release: Jun 11, 2017
  • Number of updates: 55
  • Update frequency: every 31.3 days
  • Top authors: canitb (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /17,315 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼39.11ms] Passed 4 tests

A check of server-side resources used by SoundCloud Sound Competition
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.78 ▲4.80
Dashboard /wp-admin3.02 ▼0.3321.65 ▼41.94
Posts /wp-admin/edit.php3.02 ▼0.3425.35 ▼29.51
Add New Post /wp-admin/post-new.php3.02 ▼2.8723.91 ▼75.72
Media Library /wp-admin/upload.php3.02 ▼0.2126.62 ▼9.26
Settings /wp-admin/admin.php?page=remixcomp-settings3.0222.91
Sound Contest /wp-admin/admin.php?page=soundcloud-sound-competition3.0223.23

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for SoundCloud Sound Competition
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.42 ▼0.232.07 ▲0.0749.82 ▲9.98
Dashboard /wp-admin2,222 ▲485.63 ▲0.0391.05 ▲0.2139.22 ▼2.04
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0139.74 ▲0.5734.42 ▼4.32
Add New Post /wp-admin/post-new.php1,547 ▲1923.61 ▲0.46670.92 ▼24.6159.04 ▲1.76
Media Library /wp-admin/upload.php1,430 ▲304.20 ▲0.03107.77 ▲0.8148.47 ▼1.24
Settings /wp-admin/admin.php?page=remixcomp-settings1,0722.0424.0435.61
Sound Contest /wp-admin/admin.php?page=soundcloud-sound-competition8172.1625.2526.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_ken_remixcomp_voting
    • wp_ken_remixcomp_users
    • wp_ken_remixcomp_entrees
    • wp_ken_remixcomp_fb_voters
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=soundcloud-sound-competition
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=soundcloud-sound-competition
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-helper-functions.php+248
    Undefined variable: kenrmx_wpsc_entrees_page_url
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=soundcloud-sound-competition
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-lic.php+18
    Undefined variable: kenrmx_license_code
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+25
    Undefined index: check_post
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=soundcloud-sound-competition
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-remixers.php+114
    Undefined variable: kenrmx_sc_remix_type
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+75
    Undefined variable: kenrmx_wpsc_more_info_url
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+79
    Undefined variable: kenrmx_wpsc_preview_type
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+97
    Undefined variable: kenrmx_wpsc_connect_page_url
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+101
    Undefined variable: kenrmx_sc_client_id
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+103
    Undefined variable: kenrmx_sc_client_secret
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+144
    Undefined variable: kenrmx_facebook_width
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+146
    Undefined variable: kenrmx_facebook_comments
    • > GET request to /wp-admin/admin.php?page=remixcomp-settings
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-settings.php+148
    Undefined variable: kenrmx_twitter_via_user
    • > GET request to /wp-admin/admin.php?page=soundcloud-sound-competition
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-remixers.php+44
    Undefined index: set_star
    • > GET request to /wp-admin/admin.php?page=soundcloud-sound-competition
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-remixers.php+58
    Undefined index: remove_star
    • > GET request to /wp-admin/admin.php?page=soundcloud-sound-competition
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-remixers.php+72
    Undefined index: delete
    • > GET request to /wp-admin/admin.php?page=soundcloud-sound-competition
    • > Notice in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-remixers.php+110
    Undefined index: rmx_slug

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
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'rcu_sc_permalink_url' of non-object in wp-content/plugins/soundcloud-sound-competition/view/print_all_sound.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-lic.php:99
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\FacebookRequestException' not found in wp-content/plugins/soundcloud-sound-competition/API/Facebook/FacebookPermissionException.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphObject' not found in wp-content/plugins/soundcloud-sound-competition/API/Facebook/GraphLocation.php:32
    • > PHP Notice
      Undefined variable: result2 in wp-content/plugins/soundcloud-sound-competition/view/print_one.php on line 3
    • > PHP Warning
      Use of undefined constant MYPLUGINNAME_PATH - assumed 'MYPLUGINNAME_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/soundcloud-sound-competition/Classes/class-admin-l.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\FacebookSDKException' not found in wp-content/plugins/soundcloud-sound-competition/API/Facebook/FacebookRequestException.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/soundcloud-sound-competition/view/print_all.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/soundcloud-sound-competition/view/print_one.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\GraphObject' not found in wp-content/plugins/soundcloud-sound-competition/API/Facebook/GraphUser.php:32

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

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (SoundCloud Sound Contest New remixers backend), #2 (SoundCloud Sound Contest Settings backend), #3 (SoundCloud Sound Contest SoundCloud Connect button), #4 (SoundCloud Sound Contest List front end), #5 (SoundCloud Sound Contest Upload and collect email), #6 (SoundCloud Sound Contest Facebook before connection), #7 (SoundCloud Sound Contest Facebook after connection voting)
The official readme.txt might help

soundcloud-sound-competition/soundcloud-sound-competition.php Passed 13 tests

"SoundCloud Sound Competition" version 1.1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
75 characters long description:
Host your own Sound Contest integrated with SoundCloud and Facebook voting.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/soundcloud-sound-competition/API/Facebook/fb_ca_chain_bundle.crt
3,780 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP356482,1532,979
PO File3183192420
CSS22538342
JSON17039

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.42
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods136
▷ Static methods139.56%
▷ Public methods11685.29%
▷ Protected methods1410.29%
▷ Private methods64.41%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants327.27%
▷ Class constants872.73%
▷ Public constants8100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 PNG files occupy 0.54MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/connect.png3.72KB2.51KB▼ 32.61%
screenshot-6.png35.86KB10.46KB▼ 70.84%
images/button-latest.png1.79KB0.65KB▼ 63.73%
images/button-rating.png1.90KB0.69KB▼ 63.57%
screenshot-1.png88.15KB29.18KB▼ 66.89%