83% hiweb-upload-dir-limit

Code Review | hiWeb Upload Dir Limit

WordPress plugin hiWeb Upload Dir Limit scored83%from 54 tests.

About plugin

  • Plugin page: hiweb-upload-dir-...
  • Plugin version: 1.0.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.3
  • WordPress version: 6.3.1
  • First release: Apr 12, 2016
  • Latest release: May 21, 2016
  • Number of updates: 7
  • Update frequency: every 5.6 days
  • Top authors: Den Media (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,027 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by hiWeb Upload Dir Limit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.78 ▼2.24
Dashboard /wp-admin3.32 ▲0.0244.66 ▼7.79
Posts /wp-admin/edit.php3.37 ▲0.0145.41 ▼0.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.29 ▼2.21
Media Library /wp-admin/upload.php3.25 ▲0.0136.00 ▲1.18

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by hiWeb Upload Dir Limit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.63 ▼0.754.88 ▲3.0941.36 ▼1.58
Dashboard /wp-admin2,206 ▲184.85 ▼0.03111.41 ▼1.1741.76 ▼1.80
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0339.83 ▼1.7035.07 ▲0.01
Add New Post /wp-admin/post-new.php1,520 ▼923.37 ▲5.05685.19 ▲54.7862.20 ▲11.04
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0697.27 ▼4.1240.69 ▼5.04

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-upload-dir-limit/inc/options-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-upload-dir-limit/inc/options-page.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 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
Attributes that need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Invalid URI found ("")
  • Screenshots: These screenshots require images: #1 (Set a limit on the upload files to the main General Settings page), #2 (If a limit is exceeded, after uploading the file (or files), there is an error.)
You can look at the official readme.txt

hiweb-upload-dir-limit/hiweb-upload-dir-limit.php Passed 13 tests

The primary PHP file in "hiWeb Upload Dir Limit" version 1.0.0.0 is used by WordPress to initiate all plugin functionality
68 characters long description:
This little plugin allows you to specify a size limit upload folder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin60 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP322860

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.48MB with 0.31MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png29.14KB14.89KB▼ 48.89%
screenshot-2.png467.01KB103.59KB▼ 77.82%