74% acclectic-media-organizer

Code Review | Acclectic Media Organizer

WordPress plugin Acclectic Media Organizer scored74%from 54 tests.

About plugin

  • Plugin page: acclectic-media-o...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2021
  • Latest release: Sep 14, 2022
  • Number of updates: 16
  • Update frequency: every 35.5 days
  • Top authors: acclectic (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,213 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.16ms] Passed 4 tests

An overview of server-side resources used by Acclectic Media Organizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1544.56 ▲6.39
Dashboard /wp-admin3.46 ▲0.1647.67 ▼2.48
Posts /wp-admin/edit.php3.57 ▲0.2247.76 ▼4.30
Add New Post /wp-admin/post-new.php6.06 ▲0.1784.51 ▼10.77
Media Library /wp-admin/upload.php3.38 ▲0.1539.88 ▼3.09

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 56 new files
Database: 2 new tables, 6 new options
New tables
wp_sp_media_organizer_folders
wp_sp_media_organizer_items
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Acclectic Media Organizer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲12914.06 ▼0.372.01 ▲0.3644.29 ▲0.98
Dashboard /wp-admin2,250 ▲655.83 ▲0.00125.95 ▲24.5552.48 ▲7.40
Posts /wp-admin/edit.php2,120 ▲312.63 ▲0.6252.64 ▲10.2045.56 ▲9.67
Add New Post /wp-admin/post-new.php1,548 ▲3417.87 ▲0.18692.27 ▲6.3445.23 ▼14.04
Media Library /wp-admin/upload.php1,620 ▲2325.62 ▲1.36135.55 ▲21.5474.33 ▲26.44

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
  • Zombie tables detected upon uninstall: 2 tables
    • wp_sp_media_organizer_items
    • wp_sp_media_organizer_folders
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(ACCLECTIC_PATHinc/control-panel.php): failed to open stream: No such file or directory in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 19
    • > PHP Warning
      Use of undefined constant ACCLECTIC_PATH - assumed 'ACCLECTIC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 17
    • > PHP Warning
      include_once(ACCLECTIC_PATHinc/wp-helper.php): failed to open stream: No such file or directory in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 17
    • > PHP Warning
      include_once(): Failed opening 'ACCLECTIC_PATHinc/wp-helper.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'Acclectic\\ControlPanel' not found in wp-content/plugins/acclectic-media-organizer/inc/plugin.php:22
    • > PHP Warning
      Use of undefined constant ACCLECTIC_PATH - assumed 'ACCLECTIC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 18
    • > PHP Warning
      include_once(): Failed opening 'ACCLECTIC_PATHinc/control-panel.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 19
    • > PHP Warning
      Use of undefined constant ACCLECTIC_PATH - assumed 'ACCLECTIC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 19
    • > PHP Warning
      include_once(ACCLECTIC_PATHinc/strings.php): failed to open stream: No such file or directory in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 18
    • > PHP Warning
      include_once(): Failed opening 'ACCLECTIC_PATHinc/strings.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

acclectic-media-organizer/acclectic-media-organizer.php Passed 13 tests

The entry point to "Acclectic Media Organizer" version 1.4 is a PHP file that has certain tags in its header comment area
86 characters long description:
A media organizer that lets you categorize and group media files into virtual folders.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected9,827 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript64542,5667,954
CSS417637865
PHP511694526
PO File10170160400
SVG100682

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods414.81%
▷ Public methods2074.07%
▷ Protected methods00.00%
▷ Private methods725.93%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
third_party/jstree/themes/acclectic/chevron-down-36px.png2.55KB0.18KB▼ 92.97%
assets/resizer_handle.png1.62KB0.60KB▼ 63.12%
third_party/jstree/themes/acclectic/chevron-right-36px.png2.68KB0.18KB▼ 93.37%
assets/resizer_background.png1.57KB0.10KB▼ 93.64%
third_party/jstree/themes/acclectic/folder-36px.png2.53KB0.20KB▼ 92.24%