84% wp-upload-size

Code Review | WP Upload Size

WordPress plugin WP Upload Size scored84%from 54 tests.

About plugin

  • Plugin page: wp-upload-size
  • Plugin version: 2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.0
  • WordPress version: 6.3.1
  • First release: May 12, 2018
  • Latest release: Dec 5, 2022
  • Number of updates: 30
  • Update frequency: every 55.6 days
  • Top authors: husainahmedqureshi (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

3,000+ active /47,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.60ms] Passed 4 tests

This is a short check of server-side resources used by WP Upload Size
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.26 ▲1.84
Dashboard /wp-admin3.32 ▲0.0243.54 ▼8.45
Posts /wp-admin/edit.php3.37 ▲0.0245.30 ▼1.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.72 ▼10.30
Media Library /wp-admin/upload.php3.24 ▲0.0239.28 ▲4.12
WP Upload Size /wp-admin/tools.php?page=wpusUploadSize3.2129.49

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Upload Size
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.40 ▲0.051.64 ▼0.1039.96 ▲1.39
Dashboard /wp-admin2,199 ▲255.65 ▲0.1382.97 ▼8.3937.44 ▼2.30
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0138.64 ▲0.0231.85 ▼0.18
Add New Post /wp-admin/post-new.php1,539 ▲1323.24 ▲0.23604.86 ▼9.4270.94 ▲11.07
Media Library /wp-admin/upload.php1,407 ▲44.24 ▲0.12103.47 ▼0.6744.11 ▼2.86
WP Upload Size /wp-admin/tools.php?page=wpusUploadSize7852.0024.4423.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-upload-size/wp-upload-size.php:17

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: max_upload_size, upload_max_filesize, upload limit, post max size, upload file size more and more...

wp-upload-size/wp-upload-size.php Passed 13 tests

The primary PHP file in "WP Upload Size" version 2.0 is used by WordPress to initiate all plugin functionality
44 characters long description:
Increase upload media file size in wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110938

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.22
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected