94% js-file-selector

Code Review | JS File Selector

WordPress plugin JS File Selector scored 94% from 53 tests.

About plugin

  • Plugin page: js-file-selector
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 5.8.1
  • First release: Dec 25, 2014
  • Latest release: Jan 8, 2015
  • Number of updates: 7
  • Update frequency: every 2.0 days
  • Top authors: Chrgiga (100%)

Code review

53 tests

User reviews

1 review

Install metrics

30+ active / 1,245 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.30MB] [CPU: ▼268.11ms] Passed 4 tests

A check of server-side resources used by JS File Selector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1641.58 ▲24.06
Dashboard /wp-admin3.10 ▲0.0542.22 ▲0.03
Posts /wp-admin/edit.php3.16 ▲0.0542.83 ▼0.50
Add New Post /wp-admin/post-new.php4.08 ▼1.3447.91 ▼1,065.91
Media Library /wp-admin/upload.php3.05 ▲0.0433.66 ▼6.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for JS File Selector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,654 ▲4816.07 ▲0.458.12 ▼1.2553.24 ▲5.95
Dashboard /wp-admin2,938 ▲885.88 ▲0.04138.74 ▲3.4999.09 ▲0.01
Posts /wp-admin/edit.php2,711 ▲82.69 ▲0.0063.98 ▼5.9693.15 ▲0.31
Add New Post /wp-admin/post-new.php2,203 ▲72222.96 ▲4.52380.60 ▼12.29119.44 ▲7.96
Media Library /wp-admin/upload.php1,780 ▲55.01 ▲0.01143.01 ▼6.71110.06 ▼13.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/js-file-selector/jsfileselector.php:246

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: javascript, js, page, post, file javascript

js-file-selector/jsfileselector.php 92% from 13 tests

Analyzing the main PHP file in "JS File Selector" version 1.0.3
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("js-file-selector.php" instead of "jsfileselector.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin280 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.67
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 functions10100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin