74% catfolders

Code Review | CatFolders - WP Media Folders

WordPress plugin CatFolders - WP Media Folders scored74%from 54 tests.

About plugin

  • Plugin page: catfolders
  • Plugin version: 2.3.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Oct 15, 2022
  • Latest release: Sep 5, 2023
  • Number of updates: 13
  • Update frequency: every 25.1 days
  • Top authors: catfolders (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /7,134 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.75MB] [CPU: ▲0.38ms] Passed 4 tests

Analyzing server-side resources used by CatFolders - WP Media Folders
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4542.53 ▲4.19
Dashboard /wp-admin4.13 ▲0.8258.92 ▲13.86
Posts /wp-admin/edit.php4.19 ▲0.8348.42 ▲9.63
Add New Post /wp-admin/post-new.php6.87 ▲0.9887.48 ▼21.82
Media Library /wp-admin/upload.php4.13 ▲0.9041.61 ▲9.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 118 new files
Database: 2 new tables, 8 new options
New tables
wp_catfolders_posts
wp_catfolders
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
catf_first_folder
catf_version
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by CatFolders - WP Media Folders
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲30015.20 ▲0.581.68 ▼0.1030.86 ▼12.99
Dashboard /wp-admin2,452 ▲2726.52 ▲0.93109.50 ▲19.6894.73 ▲59.75
Posts /wp-admin/edit.php2,267 ▲1673.19 ▲1.1645.88 ▲6.4735.90 ▼2.59
Add New Post /wp-admin/post-new.php1,844 ▲31824.36 ▲1.39685.69 ▲79.7139.15 ▼14.98
Media Library /wp-admin/upload.php1,965 ▲5659.01 ▲4.82253.81 ▲155.3850.84 ▲8.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_catfolders_posts
    • wp_catfolders
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • catf_version
    • widget_recent-posts
    • widget_recent-comments
    • catf_first_folder

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 26× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'TenQuality\\Data\\Contracts\\Arrayable' not found in wp-content/plugins/catfolders/vendor/10quality/php-data-model/src/Collection.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/catfolders/vendor/10quality/wp-query-builder/tests/cases/QueryBuilderStatementsTest.php:14
    • > PHP Fatal error
      Trait 'CatFolders\\Traits\\Singleton' not found in wp-content/plugins/catfolders/includes/Internals/Modules/MediaMeta.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/catfolders/vendor/10quality/wp-query-builder/tests/cases/TraitModelTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/catfolders/vendor/10quality/php-data-model/tests/cases/CollectionTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/catfolders/vendor/10quality/wp-query-builder/tests/cases/AbstractModelTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CatFolders\\Core\\Base' not found in wp-content/plugins/catfolders/includes/Backend/Enqueue.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/catfolders/vendor/10quality/wp-query-builder/tests/cases/QueryBuilderOperationsTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'TenQuality\\Data\\Model' not found in wp-content/plugins/catfolders/vendor/10quality/wp-query-builder/src/Abstracts/DataModel.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/catfolders/vendor/10quality/wp-query-builder/tests/cases/SanitizationTest.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
5 plugin tags: folders, media library, wordpress media library folders, wp media folders, media folder

catfolders/catfolders.php Passed 13 tests

Analyzing the main PHP file in "CatFolders - WP Media Folders" version 2.3.1
114 characters long description:
Organize and manage your files with WordPress media library folders. Unlimitedly fast, flexible, and professional.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected8,287 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
PHP767252,5936,471
PO File3348376783
JavaScript658243441
JSON300198
Markdown2740184
SVG2220174
XML20031
CSS5005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.80
▷ Minimum class complexity1.00
▷ Maximum class complexity143.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces21
Interfaces3
Traits4
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods446
▷ Static methods8318.61%
▷ Public methods40791.26%
▷ Protected methods71.57%
▷ Private methods327.17%
Functions36
▷ Named functions925.00%
▷ Anonymous functions2775.00%
Constants18
▷ Global constants1266.67%
▷ Class constants633.33%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin