58% dms

Code Review | Document Management System

WordPress plugin Document Management System scored 58% from 54 tests.

About plugin

  • Plugin page: dms
  • Plugin version: 1.24
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Jan 5, 2018
  • Number of updates: 45
  • Update frequency: every 16.7 days
  • Top authors: reifsnyderb (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

400+ active / 28,715 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.14MB] [CPU: ▼41.71ms] Passed 4 tests

This is a short check of server-side resources used by Document Management System
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6014.61 ▼26.88
Dashboard /wp-admin2.86 ▼0.4416.50 ▼34.19
Posts /wp-admin/edit.php2.87 ▼0.4917.62 ▼30.22
Add New Post /wp-admin/post-new.php2.86 ▼3.0217.19 ▼75.54
Media Library /wp-admin/upload.php2.87 ▼0.3618.61 ▼17.63

Server storage [IO: ▲0.75MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 129 new files
Database: 23 new tables, 7 new options
New tables
dms_groups_users_link
dms_auto_folder_creation
dms_object_properties_sb
dms_lifecycles
dms_object_versions
dms_user_doc_history
dms_audit_log
dms_object_version_comments
dms_groups
dms_file_sys_counters
...
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
dms_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Document Management System
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6114.79 ▲0.431.82 ▼0.1143.86 ▲0.02
Dashboard /wp-admin2,222 ▲475.86 ▲0.9298.61 ▼10.1141.73 ▼7.93
Posts /wp-admin/edit.php2,102 ▲162.02 ▲0.0236.04 ▲0.0431.36 ▼0.02
Add New Post /wp-admin/post-new.php1,560 ▲2318.37 ▼5.06630.98 ▲18.1372.76 ▲6.55
Media Library /wp-admin/upload.php1,404 ▲164.28 ▼0.0696.66 ▼15.7547.52 ▲2.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-includes/link-template.php+445
    Trying to get property 'ID' of non-object
  • This plugin does not fully uninstall, leaving 23 tables in the database
    • dms_groups
    • dms_exp_folders
    • dms_objects
    • dms_help_system
    • dms_user_prefs
    • dms_routing_data
    • dms_object_version_comments
    • dms_notify
    • dms_lifecycles
    • dms_file_sys_counters
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • dms_db_version
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/dms/includes/general/i_dest_path_and_file.php
    • > /wp-content/plugins/dms/includes/general/i_perms_set.php
    • > /wp-content/plugins/dms/includes/general/i_set_config.php
  • 77× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'DMS_DIR/includes/general/i_dest_path_and_file.php' (include_path='.:/usr/share/php') in wp-content/plugins/dms/pages/file_copy.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dms_get_var() in wp-content/plugins/dms/pages/file_recall.php:16
    • > PHP Notice
      Undefined variable: dms_user_id in wp-content/plugins/dms/pages/folder_close_all.php on line 22
    • > PHP Warning
      require_once(DMS_DIR/includes/general/i_set_config.php): failed to open stream: No such file or directory in wp-content/plugins/dms/pages/set_config.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dms_get_var() in wp-content/plugins/dms/pages/folder_config_change.php:20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dms/pages/file_retrieve.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dms_redirect() in wp-content/plugins/dms/pages/group_editor.php:19
    • > PHP Notice
      Undefined index: dms_user_id in wp-content/plugins/dms/pages/dms_frame.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dms/pages/diags.php on line 15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dms/pages/set_config.php on line 14

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === dms === )
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #1 (The main screen with one folder and one file. The "Administrator" button is only visible to administrators. Note: DMS Pro is required to display image thumbnails.), #2 (The screen for creating and editing user permissions groups.), #3 (The File Options Screen. The "Comments" section and revision control features are from the Pro version. The Folder Options Screen is similar and also has the permissions system.), #4 (This is the Properties Search Screen. The "Keyword(s)" and "Area of Practice" fields can be added by an administrator.), #5 (The Import Document Screen. You can set the initial version and searchable properties when you import a document. Note: DMS Pro is required to display the upload progress bar.), #6 (Document Auditing Screen on the Pro version.), #7 (User Auditing Screen on the Pro version.), #8 (The document Check-In screen on the Pro Version.)
You can look at the official readme.txt

dms/dms.php Passed 13 tests

Analyzing the main PHP file in "Document Management System" version 1.24
42 characters long description:
The complete document management solution.

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 plugin9,016 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP443,2462,1868,908
CSS23440108

PHP code Passed 2 tests

A brief analysis 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.19
Average class complexity6.75
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions133
▷ Named functions133100.00%
▷ Anonymous functions00.00%
Constants585
▷ Global constants585100.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
65 PNG files occupy 0.21MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tango_icons/16x16/x-office-drawing.png0.53KB0.46KB▼ 13.68%
images/tango_icons/32x32/document-new.png0.98KB1.41KB0.00%
screenshot-4.png17.64KB8.94KB▼ 49.34%
images/custom/x-office-spreadsheet_locked.png0.74KB0.76KB0.00%
images/custom/graph_grey.png0.16KB0.09KB▼ 45.73%