78% com-netvoxlab-ownradio

Code Review | ownRadio

WordPress plugin ownRadio scored78%from 54 tests.

About plugin

  • Plugin page: com-netvoxlab-own...
  • Plugin version: 2019.10.29
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Oct 29, 2019
  • Number of updates: 52
  • Update frequency: every 18.9 days
  • Top authors: foxstrot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,275 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by ownRadio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.57 ▼4.25
Dashboard /wp-admin3.32 ▲0.0149.26 ▼4.17
Posts /wp-admin/edit.php3.37 ▲0.0145.24 ▼2.88
Add New Post /wp-admin/post-new.php5.90 ▲0.01106.18 ▲6.68
Media Library /wp-admin/upload.php3.24 ▲0.0134.78 ▼6.30
ownRadio /wp-admin/options-general.php?page=my-setting-admin3.1832.72

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by ownRadio
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8913.23 ▼1.061.92 ▼0.0538.94 ▼9.81
Dashboard /wp-admin2,213 ▲225.86 ▼0.0499.74 ▼6.0739.75 ▼0.81
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0434.65 ▼5.3333.15 ▲0.31
Add New Post /wp-admin/post-new.php1,536 ▲822.51 ▼0.53667.35 ▼25.4053.24 ▲0.31
Media Library /wp-admin/upload.php1,392 ▲44.23 ▼0.0195.19 ▼13.7142.60 ▼2.28
ownRadio /wp-admin/options-general.php?page=my-setting-admin8012.0625.7728.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • netvoxlab_ownradio_player_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=my-setting-admin
    • > Notice in wp-content/plugins/com-netvoxlab-ownradio/ownradio.php+142
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/com-netvoxlab-ownradio/nvxownradioadminmenu.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/com-netvoxlab-ownradio/ownradio.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #2 (This is example of web site with the ownRadio player.) image missing
Please take inspiration from this readme.txt

com-netvoxlab-ownradio/ownradio.php 92% from 13 tests

Analyzing the main PHP file in "ownRadio" version 2019.10.29
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("com-netvoxlab-ownradio.php" instead of "ownradio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,584 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods1466.67%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 1.28MB with 0.92MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/img/bg-1.png820.79KB288.55KB▼ 64.84%
assets/images/pic.png146.73KB12.36KB▼ 91.58%
assets/pic.png146.73KB12.36KB▼ 91.58%
assets/css/img/iphone.png167.56KB53.08KB▼ 68.32%
assets/screenshot-1.png25.55KB13.82KB▼ 45.91%