73% categorify

Code Review | Categorify - WordPress Media Library Category & File Manager

WordPress plugin Categorify - WordPress Media Library Category & File Manager scored73%from 54 tests.

About plugin

  • Plugin page: categorify
  • Plugin version: 1.0.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2021
  • Latest release: Nov 20, 2023
  • Number of updates: 22
  • Update frequency: every 35.2 days
  • Top authors: frenify (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /16,869 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▲3.16ms] Passed 4 tests

Analyzing server-side resources used by Categorify - WordPress Media Library Category & File Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.11 ▲0.6536.80 ▲0.99
Dashboard /wp-admin3.96 ▲0.6650.60 ▼2.02
Posts /wp-admin/edit.php4.01 ▲0.6652.79 ▲8.87
Add New Post /wp-admin/post-new.php6.49 ▲0.6195.83 ▲5.57
Media Library /wp-admin/upload.php3.88 ▲0.6541.69 ▲8.11
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius4.0538.23

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 226 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
fs_debug_mode
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
categorify_sidebar_width
db_upgraded
fs_accounts
fs_active_plugins
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Categorify - WordPress Media Library Category & File Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14314.62 ▲0.271.71 ▲0.0632.66 ▼9.20
Dashboard /wp-admin2,310 ▲1336.38 ▲0.79116.69 ▲19.9740.98 ▲0.91
Posts /wp-admin/edit.php2,239 ▲1423.48 ▲1.4753.55 ▲17.8737.63 ▼0.97
Add New Post /wp-admin/post-new.php1,582 ▲5523.04 ▲0.01617.38 ▼87.1738.03 ▼16.61
Media Library /wp-admin/upload.php1,688 ▲2944.67 ▲0.4988.67 ▼8.3042.78 ▲2.69
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,2143.1446.0925.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/categorify/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • categorify_sidebar_width
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • fs_accounts
    • fs_active_plugins
    • fs_debug_mode
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'CATEGORIFY_PATHinc/sidebar.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/categorify/inc/plugin.php on line 14
    • > PHP Warning
      include_once(CATEGORIFY_PATHinc/settings/settings.php): failed to open stream: No such file or directory in wp-content/plugins/categorify/inc/plugin.php on line 15
    • > PHP Warning
      Use of undefined constant CATEGORIFY_PATH - assumed 'CATEGORIFY_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/categorify/inc/plugin.php on line 12
    • > PHP Warning
      include_once(): Failed opening 'CATEGORIFY_PATHinc/settings/settings.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/categorify/inc/plugin.php on line 15
    • > PHP Warning
      include_once(): Failed opening 'CATEGORIFY_PATHinc/category.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/categorify/inc/plugin.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/categorify/inc/sidebar.php:8
    • > PHP Warning
      Use of undefined constant CATEGORIFY_PATH - assumed 'CATEGORIFY_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/categorify/inc/plugin.php on line 15
    • > PHP Warning
      Use of undefined constant CATEGORIFY_PATH - assumed 'CATEGORIFY_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/categorify/inc/plugin.php on line 14
    • > PHP Warning
      include_once(CATEGORIFY_PATHinc/sidebar.php): failed to open stream: No such file or directory in wp-content/plugins/categorify/inc/plugin.php on line 14
    • > PHP Warning
      include_once(): Failed opening 'CATEGORIFY_PATHinc/helper.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/categorify/inc/plugin.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

categorify/categorify.php Passed 13 tests

The main PHP script in "Categorify - WordPress Media Library Category & File Manager" version 1.0.7.4 is automatically included on every request by WordPress
68 characters long description:
Organize your WordPress media files in categories via drag and drop.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin39,149 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1258,24617,39734,598
JavaScript127332442,664
CSS18651021,655
SVG1007232

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity79.88
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes57
▷ Abstract classes23.51%
▷ Concrete classes5596.49%
▷ Final classes00.00%
Methods1,334
▷ Static methods20515.37%
▷ Public methods93169.79%
▷ Protected methods171.27%
▷ Private methods38628.94%
Functions104
▷ Named functions10399.04%
▷ Anonymous functions10.96%
Constants155
▷ Global constants10869.68%
▷ Class constants4730.32%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%