68% upload-security

Code Review | Upload Security

WordPress plugin Upload Security scored68%from 54 tests.

About plugin

  • Plugin page: upload-security
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Mar 14, 2017
  • Latest release: Mar 14, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: saha96 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /403 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼35.19ms] Passed 4 tests

This is a short check of server-side resources used by Upload Security
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.66 ▼3.41
Dashboard /wp-admin3.00 ▼0.3022.81 ▼28.00
Posts /wp-admin/edit.php3.00 ▼0.3524.43 ▼21.38
Add New Post /wp-admin/post-new.php3.00 ▼2.8821.40 ▼79.58
Media Library /wp-admin/upload.php3.00 ▼0.2223.92 ▼11.79
Upload Security /wp-admin/options-general.php?page=upload-security/upload-security-sarbajitsaha.php3.0022.44

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Upload Security
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.67 ▼0.711.74 ▼0.1041.85 ▼0.63
Dashboard /wp-admin2,210 ▲224.83 ▼1.03103.25 ▼4.0539.22 ▼4.76
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0535.97 ▼1.6232.80 ▼7.33
Add New Post /wp-admin/post-new.php1,536 ▲1723.03 ▼0.19677.10 ▲8.1961.51 ▲6.10
Media Library /wp-admin/upload.php1,395 ▲134.31 ▲0.12100.87 ▼4.5742.80 ▼4.31
Upload Security /wp-admin/options-general.php?page=upload-security/upload-security-sarbajitsaha.php7722.0523.3126.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=upload-security/upload-security-sarbajitsaha.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=upload-security/upload-security-sarbajitsaha.php
    • > Notice in wp-content/plugins/upload-security/upload-security-sarbajitsaha.php+35
    Undefined index: secure_uploads
    • > GET request to /wp-admin/options-general.php?page=upload-security/upload-security-sarbajitsaha.php
    • > Notice in wp-content/plugins/upload-security/upload-security-sarbajitsaha.php+49
    Undefined variable: str4

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/upload-security/upload-security-sarbajitsaha.php

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: uploads, security

upload-security/upload-security-sarbajitsaha.php 92% from 13 tests

The main file in "Upload Security" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("upload-security.php" instead of "upload-security-sarbajitsaha.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin47 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111247

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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 images were found in this plugin