78% find-remote-file

Code Review | Find Remote File

WordPress plugin Find Remote File scored78%from 54 tests.

About plugin

  • Plugin page: find-remote-file
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Oct 5, 2018
  • Latest release: Oct 6, 2018
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: sanjayks992 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /464 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.03MB] [CPU: ▼0.10ms] Passed 4 tests

Analyzing server-side resources used by Find Remote File
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.67 ▲1.15
Dashboard /wp-admin3.34 ▲0.0349.46 ▲1.73
Posts /wp-admin/edit.php3.39 ▲0.0345.64 ▲1.35
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.52 ▼4.62
Media Library /wp-admin/upload.php3.26 ▲0.0337.51 ▲5.97

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Find Remote File
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.56 ▼0.831.70 ▼0.2243.48 ▼2.32
Dashboard /wp-admin2,218 ▲444.87 ▼0.94136.23 ▲18.7841.08 ▼5.29
Posts /wp-admin/edit.php2,098 ▲122.01 ▲0.0235.33 ▼0.5033.08 ▼0.27
Add New Post /wp-admin/post-new.php1,552 ▲1618.41 ▼4.88598.25 ▼24.8251.92 ▼1.85
Media Library /wp-admin/upload.php1,400 ▲124.20 ▼0.1295.22 ▼5.5640.91 ▼2.27

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/find-remote-file/views/file-details-preview.php
    • > /wp-content/plugins/find-remote-file/views/find-remote-file-dashboard.php
    • > /wp-content/plugins/find-remote-file/admin/partials/file-url-validator-admin.php
    • > /wp-content/plugins/find-remote-file/admin/partials/file-details-preview.php
    • > /wp-content/plugins/find-remote-file/public/partials/find-remote-file-public-display.php
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/find-remote-file/admin/partials/file-details-preview.php on line 19
    • > PHP Notice
      Undefined variable: file_prev_details in wp-content/plugins/find-remote-file/admin/partials/file-details-preview.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/find-remote-file/views/file-details-preview.php on line 19
    • > PHP Notice
      Undefined variable: file_prev_details in wp-content/plugins/find-remote-file/views/file-details-preview.php on line 13
    • > PHP Notice
      Undefined variable: file_prev_details in wp-content/plugins/find-remote-file/admin/partials/file-details-preview.php on line 31
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/find-remote-file/admin/partials/file-details-preview.php on line 31
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/find-remote-file/admin/partials/file-details-preview.php on line 13
    • > PHP Notice
      Undefined variable: file_prev_details in wp-content/plugins/find-remote-file/views/file-details-preview.php on line 7
    • > PHP Notice
      Undefined variable: file_prev_details in wp-content/plugins/find-remote-file/admin/partials/file-details-preview.php on line 25
    • > PHP Notice
      Undefined variable: file_prev_details in wp-content/plugins/find-remote-file/views/file-details-preview.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: The official readme.txt is a good inspiration

find-remote-file/find-remote-file.php Passed 13 tests

The main PHP script in "Find Remote File" version 1.0.0 is automatically included on every request by WordPress
93 characters long description:
This Find Remote File Plugin is basically for finding the file details by passing remote url.

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
Good job! No executable or dangerous file extensions detected1,695 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41571641,155
PHP14169472442
CSS4102698

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.14
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin