83% media-folders-codingdude

Code Review | CodingDude Media Folders

WordPress plugin CodingDude Media Folders scored83%from 54 tests.

About plugin

  • Plugin page: media-folders-cod...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Dec 9, 2019
  • Latest release: May 6, 2022
  • Number of updates: 4
  • Update frequency: every 220.0 days
  • Top authors: codingdude (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /433 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.92ms] Passed 4 tests

Server-side resources used by CodingDude Media Folders
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.27 ▼8.73
Dashboard /wp-admin3.33 ▲0.0344.22 ▼4.13
Posts /wp-admin/edit.php3.38 ▲0.0349.59 ▼0.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.49 ▼14.17
Media Library /wp-admin/upload.php3.25 ▲0.0234.39 ▲1.37
Element Category /wp-admin/edit-tags.php?taxonomy=element-category&post_type=attachment3.2528.87

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

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

Browser metrics Passed 4 tests

CodingDude Media Folders: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼1.141.64 ▼0.1738.06 ▼8.53
Dashboard /wp-admin2,213 ▲254.85 ▼0.96113.27 ▲9.5044.09 ▲3.43
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0343.08 ▲0.1435.86 ▼0.45
Add New Post /wp-admin/post-new.php1,527 ▲1323.46 ▲5.80585.50 ▼89.1347.30 ▼0.90
Media Library /wp-admin/upload.php1,392 ▲74.30 ▲0.08103.18 ▲1.8945.49 ▼0.11
Element Category /wp-admin/edit-tags.php?taxonomy=element-category&post_type=attachment1,2632.1329.4928.45

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/media-folders-codingdude/function.php:32

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)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: media library, folders, categories

media-folders-codingdude/function.php 69% from 13 tests

The main file in "CodingDude Media Folders" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: Use only dashes and lowercase characters for the domain path ("Domain Path")
  • Domain Path: The domain path must begin with a forward slash character ("/Domain Path")
  • Main file name: Name the main plugin file the same as the plugin slug ("media-folders-codingdude.php" instead of "function.php")

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 plugin66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162566

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions3
▷ Named functions3100.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