84% acclectic-media-organizer

Code Review | Acclectic Media Organizer

WordPress plugin Acclectic Media Organizer scored 84% from 54 tests.

About plugin

  • Plugin page: acclectic-media-o...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8
  • WordPress version: 5.9.2
  • First release: Feb 25, 2021
  • Latest release: Oct 31, 2021
  • Number of updates: 14
  • Update frequency: every 17.9 days
  • Top authors: acclectic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼300.15ms] Passed 4 tests

This is a short check of server-side resources used by Acclectic Media Organizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2252.53 ▼1.86
Dashboard /wp-admin3.57 ▲0.1732.56 ▼0.63
Posts /wp-admin/edit.php3.80 ▲0.1636.84 ▼2.26
Add New Post /wp-admin/post-new.php7.06 ▲0.0796.97 ▼1,195.85
Media Library /wp-admin/upload.php3.46 ▲0.1724.77 ▲0.68

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 56 new files
Database: 2 new tables, no new options
New tables
wp_sp_media_organizer_items
wp_sp_media_organizer_folders

Browser metrics Passed 4 tests

An overview of browser requirements for Acclectic Media Organizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,822 ▲10017.25 ▲1.565.69 ▲0.252.32 ▼0.13
Dashboard /wp-admin2,947 ▲897.67 ▲1.49127.03 ▼11.58146.25 ▼17.49
Posts /wp-admin/edit.php2,726 ▲325.17 ▲1.92102.24 ▲38.89134.82 ▼7.33
Add New Post /wp-admin/post-new.php1,709 ▲4819.66 ▲3.46425.57 ▲17.46158.04 ▲6.57
Media Library /wp-admin/upload.php1,931 ▲2337.79 ▲2.27150.20 ▲15.40213.69 ▲28.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_sp_media_organizer_items
    • wp_sp_media_organizer_folders

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Acclectic\\ControlPanel' not found in wp-content/plugins/acclectic-media-organizer/inc/plugin.php:22
    • > 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
      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/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
      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/strings.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 18
    • > 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
      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
      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/wp-helper.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/acclectic-media-organizer/inc/plugin.php on line 17

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require 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 main file in "Acclectic Media Organizer" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin9,821 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript64542,5667,954
CSS417537859
PHP511694526
PO File10170160400
SVG100682

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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

All PNG images should be compressed to minimize bandwidth usage for end users
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/folder-36px.png2.53KB0.20KB▼ 92.24%
assets/resizer_background.png1.57KB0.10KB▼ 93.64%
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%