89% wdes-user-upload-restriction

Code Review | WDES User Upload Restriction

WordPress plugin WDES User Upload Restriction scored89%from 54 tests.

About plugin

  • Plugin page: wdes-user-upload-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5
  • WordPress version: 6.3.1
  • First release: Aug 17, 2016
  • Latest release: Jun 1, 2019
  • Number of updates: 12
  • Update frequency: every 84.8 days
  • Top authors: master buldog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /814 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼11.48ms] Passed 4 tests

A check of server-side resources used by WDES User Upload Restriction
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.87 ▲1.27
Dashboard /wp-admin3.31 ▼0.0351.35 ▼20.54
Posts /wp-admin/edit.php3.36 ▲0.0151.72 ▲2.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.75 ▼23.61
Media Library /wp-admin/upload.php3.23 ▲0.0134.63 ▼3.02

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WDES User Upload Restriction
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.67 ▼0.051.59 ▼0.1441.76 ▼5.40
Dashboard /wp-admin2,195 ▲155.65 ▲0.0289.96 ▲4.1539.23 ▼2.25
Posts /wp-admin/edit.php2,100 ▲31.99 ▲0.0137.34 ▲2.5031.57 ▼5.11
Add New Post /wp-admin/post-new.php1,526 ▼523.26 ▼0.10671.21 ▲9.0157.78 ▲8.27
Media Library /wp-admin/upload.php1,403 ▲94.19 ▲0.02100.92 ▲2.2846.49 ▲0.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: user upload restriction, image, user role, image upload, users...

wdes-user-upload-restriction/wdes-uur.php 77% from 13 tests

This is the main PHP file of "WDES User Upload Restriction" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "4.4")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wdes-user-upload-restriction.php" instead of "wdes-uur.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
No dangerous file extensions were detected27 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP391427

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin