78% common-ninja-audio-player-for-woocommerce

Code Review | Common Ninja: Audio Player for WooCommerce

WordPress plugin Common Ninja: Audio Player for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: common-ninja-audi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.0
  • WordPress version: 6.3.1
  • First release: Jun 23, 2022
  • Latest release: Jun 29, 2022
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: CommonNinja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /266 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.65ms] Passed 4 tests

Server-side resources used by Common Ninja: Audio Player for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.57 ▲2.30
Dashboard /wp-admin3.35 ▲0.0143.16 ▼18.17
Posts /wp-admin/edit.php3.41 ▲0.0549.36 ▼0.09
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.37 ▼9.94
Media Library /wp-admin/upload.php3.28 ▲0.0535.37 ▲1.59
Audio Player /wp-admin/admin.php?page=common-ninja-audio-player-for-woocommerce3.2431.69

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Common Ninja: Audio Player for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲5513.24 ▼1.064.89 ▲3.0042.00 ▼1.05
Dashboard /wp-admin2,226 ▲385.80 ▲0.69101.98 ▼5.5138.41 ▼8.45
Posts /wp-admin/edit.php2,115 ▲262.06 ▲0.0541.35 ▼0.0035.04 ▼3.62
Add New Post /wp-admin/post-new.php1,538 ▲2423.27 ▲5.56660.65 ▲44.4866.62 ▲10.41
Media Library /wp-admin/upload.php1,408 ▲174.26 ▲0.0698.40 ▼1.3543.53 ▼0.53
Audio Player /wp-admin/admin.php?page=common-ninja-audio-player-for-woocommerce8042.0225.3128.91

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/common-ninja-audio-player-for-woocommerce/commonninja/commonninja.init.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/common-ninja-audio-player-for-woocommerce/common-ninja-audio-player-for-woocommerce.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: podcast, audio player, audio, music, mp3 player...

common-ninja-audio-player-for-woocommerce/common-ninja-audio-player-for-woocommerce.php 77% from 13 tests

The principal PHP file in "Common Ninja: Audio Player for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "5.2")

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 detected218 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions16100.00%
▷ 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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
_inc/commonninja.png2.92KB1.62KB▼ 44.44%