90% enable-contributor-uploads

Code Review | Enable Contributor Uploads

WordPress plugin Enable Contributor Uploads scored90%from 54 tests.

About plugin

  • Plugin page: enable-contributo...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Jan 15, 2016
  • Latest release: Apr 28, 2020
  • Number of updates: 21
  • Update frequency: every 74.9 days
  • Top authors: stevejonesdev (80.95%)roadwarriorwp (23.81%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /9,448 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Enable Contributor Uploads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.56 ▼2.15
Dashboard /wp-admin3.31 ▲0.0147.81 ▼5.75
Posts /wp-admin/edit.php3.37 ▲0.0149.48 ▼1.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.81 ▲0.32
Media Library /wp-admin/upload.php3.24 ▲0.0038.80 ▲2.65

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Enable Contributor Uploads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.16 ▼1.144.45 ▲2.7147.66 ▲3.38
Dashboard /wp-admin2,206 ▲185.83 ▲0.93104.33 ▼15.3645.06 ▲0.86
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0437.48 ▲0.3333.77 ▼2.70
Add New Post /wp-admin/post-new.php1,533 ▼122.97 ▼0.23635.59 ▼24.4869.10 ▲12.24
Media Library /wp-admin/upload.php1,382 ▼64.17 ▼0.09104.65 ▼8.9344.37 ▲0.48

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: upload media, contributor, enable uploads, user roles, capabilities

enable-contributor-uploads/enable-contributor-uploads.php Passed 13 tests

Analyzing the main PHP file in "Enable Contributor Uploads" version 1.1
56 characters long description:
Allows users with the contributor role to upload images.

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
Everything looks great! No dangerous files found in this plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP141314

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
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