83% remove-unrestricted-uploads

Code Review | Remove Unrestricted Uploads

WordPress plugin Remove Unrestricted Uploads scored83%from 54 tests.

About plugin

  • Plugin page: remove-unrestrict...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 26, 2021
  • Latest release: Dec 13, 2022
  • Number of updates: 5
  • Update frequency: every 125.8 days
  • Top authors: amit5204 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /3,094 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.34ms] Passed 4 tests

This is a short check of server-side resources used by Remove Unrestricted Uploads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.30 ▼7.57
Dashboard /wp-admin3.31 ▲0.0153.35 ▲3.41
Posts /wp-admin/edit.php3.36 ▲0.0050.57 ▼4.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.07 ▼15.99
Media Library /wp-admin/upload.php3.23 ▲0.0037.21 ▼5.18

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Remove Unrestricted Uploads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.60 ▲0.222.13 ▲0.1644.74 ▲0.31
Dashboard /wp-admin2,209 ▲185.84 ▼0.22106.75 ▲2.2441.44 ▲0.14
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0544.72 ▲3.6046.31 ▲7.96
Add New Post /wp-admin/post-new.php1,533 ▼13523.10 ▲1.04688.84 ▲17.0658.46 ▼0.93
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0099.26 ▼3.7644.10 ▼6.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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)
Good news, no errors were detected

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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/remove-unrestricted-uploads/remove-unrestricted-uploads.php:19

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

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Requires at least: Version not formatted correctly
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === remove-unrestricted-uploads === )
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

remove-unrestricted-uploads/remove-unrestricted-uploads.php Passed 13 tests

The main PHP script in "Remove Unrestricted Uploads" version 1.0 is automatically included on every request by WordPress
120 characters long description:
Restores the ability to upload non-image files in WordPress. This plugin allows to upload restricted files in the media.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1289

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin