84% frontend-file-upload

Code Review | Frontend File Upload

WordPress plugin Frontend File Upload scored 84% from 54 tests.

About plugin

  • Plugin page: frontend-file-upload
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 4, 2023
  • Latest release: Jul 24, 2023
  • Number of updates: 9
  • Update frequency: every 14.6 days
  • Top authors: muneebkhan21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 325 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.99ms] Passed 4 tests

A check of server-side resources used by Frontend File Upload
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.37 ▼8.10
Dashboard /wp-admin3.37 ▲0.0745.96 ▼2.09
Posts /wp-admin/edit.php3.49 ▲0.1349.54 ▲3.98
Add New Post /wp-admin/post-new.php5.97 ▲0.0992.28 ▼5.49
Media Library /wp-admin/upload.php3.30 ▲0.0737.02 ▲3.74

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Frontend File Upload
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲13513.70 ▼0.675.13 ▲3.1143.58 ▲3.79
Dashboard /wp-admin2,232 ▲414.84 ▼0.07108.64 ▲0.5142.23 ▲1.57
Posts /wp-admin/edit.php2,112 ▲202.02 ▲0.0339.91 ▲5.8635.59 ▲3.75
Add New Post /wp-admin/post-new.php1,543 ▲918.32 ▼5.07599.15 ▼57.8254.48 ▼4.86
Media Library /wp-admin/upload.php1,405 ▲174.26 ▲0.0595.93 ▲0.7740.40 ▼2.81

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/frontend-file-upload/admin/partials/frontend-file-upload-admin-display.php
    • > /wp-content/plugins/frontend-file-upload/public/partials/frontend-file-upload-public-display.php

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === frontend-file-upload === )
The official readme.txt is a good inspiration

frontend-file-upload/frontend-file-upload.php Passed 13 tests

The main PHP file in "Frontend File Upload" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
72 characters long description:
Allows users to upload files from frontend directly in WordPress storage

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin393 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12135538326
JavaScript253038
CSS24829

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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