72% random-posts-mp3-player-sharebutton

Code Review | Random Posts, Mp3 Player + ShareButton

WordPress plugin Random Posts, Mp3 Player + ShareButton scored72%from 54 tests.

About plugin

  • Plugin page: random-posts-mp3-...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.5
  • WordPress version: 6.3.1
  • First release: Oct 13, 2012
  • Latest release: Jan 1, 2013
  • Number of updates: 21
  • Update frequency: every 3.9 days
  • Top authors: dvs11 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /8,362 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by Random Posts, Mp3 Player + ShareButton
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.74 ▲1.30
Dashboard /wp-admin3.31 ▼0.0344.85 ▼12.53
Posts /wp-admin/edit.php3.37 ▲0.0145.54 ▼4.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.53 ▼10.42
Media Library /wp-admin/upload.php3.24 ▲0.0133.56 ▲1.06
Random Posts, Mp3 Player + ShareButton /wp-admin/options-general.php?page=DVS-4-in-13.1827.68

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
recovery_mode_email_last_sent
widget_recent-posts
can_compress_scripts
random_post_mp3
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Random Posts, Mp3 Player + ShareButton: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5214.42 ▼0.031.70 ▲0.1741.13 ▼0.43
Dashboard /wp-admin2,199 ▲225.54 ▼0.1381.94 ▼0.9138.90 ▼6.06
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0038.99 ▲4.2733.62 ▲0.27
Add New Post /wp-admin/post-new.php1,529 ▼023.62 ▲0.53644.86 ▼70.8843.51 ▼19.93
Media Library /wp-admin/upload.php1,407 ▲44.17 ▲0.0498.13 ▲1.5841.62 ▼2.97
Random Posts, Mp3 Player + ShareButton /wp-admin/options-general.php?page=DVS-4-in-11,1841.358.1855.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=DVS-4-in-1
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=DVS-4-in-1
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=DVS-4-in-1
    • > Error in wp-content/plugins/random-posts-mp3-player-sharebutton/rpost_mp3player_share.php+354
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/random-posts-mp3-player-sharebutton/rpost_mp3player_share.php:354
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): rpsbMp3_setting_page()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #5 {main}
    thrown

SRP 0% 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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/random-posts-mp3-player-sharebutton/style.css.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/random-posts-mp3-player-sharebutton/webvsmobile.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/random-posts-mp3-player-sharebutton/rpost_mp3player_share.php:27
    • > PHP Notice
      Undefined variable: base_color in wp-content/plugins/random-posts-mp3-player-sharebutton/webvsmobile.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/random-posts-mp3-player-sharebutton/webvsmobile.php:4
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/random-posts-mp3-player-sharebutton/rpost_mp3player_share.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/random-posts-mp3-player-sharebutton/webvsmobile_notif.php:4
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/random-posts-mp3-player-sharebutton/webvsmobile_notif.php on line 4

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can take inspiration from this readme.txt

random-posts-mp3-player-sharebutton/rpost_mp3player_share.php 85% from 13 tests

Analyzing the main PHP file in "Random Posts, Mp3 Player + ShareButton" version 1.4.1
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("random-posts-mp3-player-sharebutton.php" instead of "rpost_mp3player_share.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 480 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,085 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP53186619
JavaScript4155205460
CSS1286

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/facebook.png2.11KB1.72KB▼ 18.55%
img/up2.png1.12KB1.18KB0.00%
img/leftgree.png0.50KB0.67KB0.00%
img/gmail.png3.96KB2.19KB▼ 44.76%
img/rightgree.png0.55KB0.67KB0.00%