68% mediagauge-streaming-media-analytics

Code Review | MediaGauge - Realtime Streaming Media Analytics

WordPress plugin MediaGauge - Realtime Streaming Media Analytics scored 68% from 53 tests.

About plugin

  • Plugin page: mediagauge-stream...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-3.3.2
  • WordPress version: 5.8.1
  • First release: Nov 6, 2012
  • Latest release: Nov 7, 2012
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: chrisrxth (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 766 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.90MB] [CPU: ▼325.77ms] Passed 4 tests

Analyzing server-side resources used by MediaGauge - Realtime Streaming Media Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.96 ▲12.75
Dashboard /wp-admin2.75 ▼0.3120.45 ▼22.67
Posts /wp-admin/edit.php2.75 ▼0.3617.63 ▼24.39
Add New Post /wp-admin/post-new.php2.75 ▼2.6820.21 ▼1,232.32
Media Library /wp-admin/upload.php2.75 ▼0.2619.39 ▼23.69
MediaGauge Analytics /wp-admin/options-general.php?page=mediagauge2.7520.59

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
mediagauge_enabled

Browser metrics Passed 4 tests

MediaGauge - Realtime Streaming Media Analytics: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲9616.32 ▲0.678.66 ▼0.6447.32 ▼1.86
Dashboard /wp-admin2,938 ▲885.90 ▲0.07148.72 ▲3.26112.51 ▼0.79
Posts /wp-admin/edit.php2,711 ▲52.70 ▲0.0265.71 ▼2.11100.35 ▼9.55
Add New Post /wp-admin/post-new.php1,591 ▲11021.54 ▲3.08268.22 ▼99.29105.74 ▼13.82
Media Library /wp-admin/upload.php1,777 ▲55.01 ▼0.00163.26 ▲10.24107.10 ▼20.87
MediaGauge Analytics /wp-admin/options-general.php?page=mediagauge1,0572.0979.1080.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5663
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure has failed, leaving 1 option in the database
    • mediagauge_enabled

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
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=mediagauge
    • > User notice in wp-includes/functions.php+5663
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=mediagauge
    • > Notice in wp-content/plugins/mediagauge-streaming-media-analytics/mediagauge-analytics-admin.php+74
    Undefined variable: api_key_error

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mediagauge-streaming-media-analytics/mediagauge-analytics-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mediagauge-streaming-media-analytics/mediagauge-analytics-admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === mediagauge-streaming-media-analytics === )
  • Screenshots: These screenshots do not have images: #1 (The analytics dashboard.), #2 (The MediaGauge plugin settings page.)
Please take inspiration from this readme.txt

mediagauge-streaming-media-analytics/mediagauge-analytics.php 92% from 13 tests

The main PHP script in "MediaGauge - Realtime Streaming Media Analytics" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mediagauge-streaming-media-analytics.php" instead of "mediagauge-analytics.php")

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
No dangerous file extensions were detected87 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2332387

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png15.47KB6.19KB▼ 59.99%
icon.png2.10KB1.43KB▼ 31.90%
screenshot-1.png111.48KB41.27KB▼ 62.98%