84% custom-upload-folders

Code Review | Custom Upload Folders

WordPress plugin Custom Upload Folders scored 84% from 54 tests.

About plugin

  • Plugin page: custom-upload-fol...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.2
  • WordPress version: 6.3.1
  • First release: Feb 12, 2013
  • Latest release: Jul 3, 2013
  • Number of updates: 18
  • Update frequency: every 7.9 days
  • Top authors: brasofilo (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 2,319 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.01ms] Passed 4 tests

An overview of server-side resources used by Custom Upload Folders
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0534.40 ▼12.58
Dashboard /wp-admin3.35 ▲0.0541.94 ▼4.61
Posts /wp-admin/edit.php3.40 ▲0.0546.91 ▼4.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.19 ▼6.52
Media Library /wp-admin/upload.php3.27 ▲0.0534.17 ▲0.71

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Custom Upload Folders
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.71 ▼0.761.53 ▼0.8744.03 ▼2.30
Dashboard /wp-admin2,206 ▲184.86 ▼1.17111.86 ▼1.8142.07 ▼5.91
Posts /wp-admin/edit.php2,086 ▼02.01 ▼0.0236.02 ▲1.1634.38 ▼0.57
Add New Post /wp-admin/post-new.php1,533 ▼023.14 ▼0.18676.59 ▼4.0858.44 ▼4.25
Media Library /wp-admin/upload.php1,391 ▲64.16 ▼0.0595.89 ▼6.1941.01 ▼4.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/custom-upload-folders/custom-upload-folders.php

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: custom folder, upload, media, ftp

custom-upload-folders/custom-upload-folders.php 92% from 13 tests

"Custom Upload Folders" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin319 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP259107219
PO File22830100

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin