90% physical-custom-upload-folder

Code Review | Physical Custom Upload Folder for Real Media Library

WordPress plugin Physical Custom Upload Folder for Real Media Library scored90%from 54 tests.

About plugin

  • Plugin page: physical-custom-u...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Jan 24, 2017
  • Latest release: Mar 27, 2020
  • Number of updates: 20
  • Update frequency: every 57.8 days
  • Top authors: mguenter (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /13,410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.31ms] Passed 4 tests

Analyzing server-side resources used by Physical Custom Upload Folder for Real Media Library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.80 ▼1.77
Dashboard /wp-admin3.33 ▲0.0344.55 ▼6.32
Posts /wp-admin/edit.php3.38 ▲0.0248.68 ▲1.74
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.40 ▼8.64
Media Library /wp-admin/upload.php3.26 ▲0.0237.69 ▼8.50

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Physical Custom Upload Folder for Real Media Library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4713.22 ▼1.214.80 ▲2.8641.05 ▼0.41
Dashboard /wp-admin2,218 ▲365.81 ▲0.91100.02 ▲1.6741.16 ▼3.76
Posts /wp-admin/edit.php2,107 ▲182.06 ▲0.0239.27 ▼0.1538.32 ▲1.30
Add New Post /wp-admin/post-new.php1,546 ▲1423.33 ▲0.01674.85 ▲42.0158.52 ▲10.17
Media Library /wp-admin/upload.php1,400 ▲124.22 ▲0.03151.32 ▲56.5948.44 ▲7.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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
6 plugin tags: upload folder, real media library, file system, upload, real physical media...

physical-custom-upload-folder/upload_dir-real_media_library.php 92% from 13 tests

The main PHP file in "Physical Custom Upload Folder for Real Media Library" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("physical-custom-upload-folder.php" instead of "upload_dir-real_media_library.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin105 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12561105

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.38
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods975.00%
▷ Protected methods00.00%
▷ Private methods325.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin