83% inventive-stock-player-lite

Code Review | Inventive stock player

WordPress plugin Inventive stock player scored83%from 54 tests.

About plugin

  • Plugin page: inventive-stock-p...
  • Plugin version: 0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Jun 10, 2015
  • Latest release: Jun 10, 2015
  • Number of updates: 9
  • Update frequency: every 8.2 days
  • Top authors: inventive3d (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,226 total downloads

Benchmarks

Plugin footprint 83% 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.12MB] [CPU: ▼3.33ms] Passed 4 tests

An overview of server-side resources used by Inventive stock player
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.48 ▲2.65
Dashboard /wp-admin3.42 ▲0.1151.16 ▼10.85
Posts /wp-admin/edit.php3.53 ▲0.1749.93 ▲1.11
Add New Post /wp-admin/post-new.php6.02 ▲0.1396.74 ▼6.24
Media Library /wp-admin/upload.php3.34 ▲0.1139.15 ▲4.94
Inventive stock player /wp-admin/options-general.php?page=3.3340.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_inventive_stock_player_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Inventive stock player
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.28 ▼1.362.38 ▲0.5043.34 ▲1.03
Dashboard /wp-admin2,231 ▲435.11 ▲0.23109.62 ▼1.6737.43 ▼4.90
Posts /wp-admin/edit.php2,119 ▲272.29 ▲0.2744.03 ▲3.7835.97 ▲0.43
Add New Post /wp-admin/post-new.php1,533 ▼122.94 ▼0.29626.03 ▼69.7433.57 ▼19.74
Media Library /wp-admin/upload.php1,407 ▲194.48 ▲0.27101.84 ▼7.7242.85 ▼2.53
Inventive stock player /wp-admin/options-general.php?page=1,2362.6056.5324.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_inventive_stock_player_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/inventive-stock-player-lite/inventive-stock-audio-video-player.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/inventive-stock-player-lite/inc/widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/inventive-stock-player-lite/inc/filters.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/inventive-stock-player-lite/admin/general-options.php:54

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 80% 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:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

inventive-stock-player-lite/inventive-stock-audio-video-player.php 62% from 13 tests

This is the main PHP file of "Inventive stock player" version 0.11, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 214 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path should be prefixed with a forward slash character ("//")
  • Main file name: The principal plugin file should be the same as the plugin slug ("inventive-stock-player-lite.php" instead of "inventive-stock-audio-video-player.php")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,309 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP5247141573
PO File4174178448
JavaScript38350164
CSS12715124

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity18.00
▷ Minimum class complexity5.00
▷ Maximum class complexity24.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1477.78%
▷ Anonymous functions422.22%
Constants0
▷ Global constants00.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
No PNG files were detected