83% oasis-workflow

Code Review | Oasis Workflow

WordPress plugin Oasis Workflow scored83%from 54 tests.

About plugin

  • Plugin page: oasis-workflow
  • Plugin version: 6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2012
  • Latest release: Dec 1, 2023
  • Number of updates: 404
  • Update frequency: every 10.1 days
  • Top authors: nuggetsol (100%)

Code review

54 tests

User reviews

51 reviews

Install metrics

1,000+ active /87,075 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.04MB] [CPU: ▲14.42ms] Passed 4 tests

Server-side resources used by Oasis Workflow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.45 ▲1.9950.57 ▲12.31
Dashboard /wp-admin5.38 ▲2.0759.30 ▲8.58
Posts /wp-admin/edit.php5.41 ▲2.0562.90 ▲17.10
Add New Post /wp-admin/post-new.php9.28 ▲3.39121.68 ▲27.29
Media Library /wp-admin/upload.php5.28 ▲2.0553.63 ▲19.67
Inbox /wp-admin/admin.php?page=oasiswf-inbox5.3052.58
Tools /wp-admin/admin.php?page=oasiswf-tools5.2547.31
Stay Informed /wp-admin/admin.php?page=oasiswf-stay-informed5.2551.06
Add New Workflow /wp-admin/admin.php?page=oasiswf-add5.2749.45
Settings /wp-admin/admin.php?page=ow-settings5.2050.07
All Workflows /wp-admin/admin.php?page=oasiswf-admin5.2650.15
Workflow History /wp-admin/admin.php?page=oasiswf-history5.2950.72
Reports /wp-admin/admin.php?page=oasiswf-reports5.2752.87
Custom Statuses /wp-admin/admin.php?page=oasiswf-custom-statuses5.2550.60

Server storage [IO: ▲3.69MB] [DB: ▲0.08MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 189 new files
Database: 5 new tables, 17 new options
New tables
wp_fc_action
wp_fc_workflows
wp_fc_action_history
wp_fc_emails
wp_fc_workflow_steps
New WordPress options
oasiswf_review_rating_interval
oasiswf_workflow_completed_post_count
oasiswf_default_due_days
widget_recent-comments
widget_recent-posts
oasiswf_priority_setting
oasiswf_publish_date_setting
oasiswf_show_wfsettings_on_post_types
oasiswf_activate_workflow
oasiswf_reminder_days
...

Browser metrics Passed 4 tests

A check of browser resources used by Oasis Workflow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15114.60 ▼0.111.60 ▼0.4727.56 ▼19.34
Dashboard /wp-admin2,321 ▲1405.74 ▲0.0796.39 ▼7.8144.27 ▲3.72
Posts /wp-admin/edit.php2,196 ▲932.09 ▲0.0944.06 ▲8.1636.54 ▼0.82
Add New Post /wp-admin/post-new.php1,900 ▲37426.53 ▲3.55675.47 ▲5.0134.54 ▼28.41
Media Library /wp-admin/upload.php1,457 ▲574.19 ▲0.0198.37 ▲0.0841.01 ▼0.62
Inbox /wp-admin/admin.php?page=oasiswf-inbox1,1782.4144.8830.49
Tools /wp-admin/admin.php?page=oasiswf-tools1,2552.1832.7732.01
Stay Informed /wp-admin/admin.php?page=oasiswf-stay-informed1,3422.8654.3364.86
Add New Workflow /wp-admin/admin.php?page=oasiswf-add2,0022.8758.9167.68
Settings /wp-admin/admin.php?page=ow-settings1,0691.6726.7131.55
All Workflows /wp-admin/admin.php?page=oasiswf-admin1,5632.5139.9235.52
Workflow History /wp-admin/admin.php?page=oasiswf-history1,4062.2635.7526.28
Reports /wp-admin/admin.php?page=oasiswf-reports1,2662.1732.9030.81
Custom Statuses /wp-admin/admin.php?page=oasiswf-custom-statuses1,3682.2034.4829.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/oasis-workflow/includes/pages/workflow-create.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oasis-workflow/includes/api/api-usercap.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'OW_Report_Service' not found in wp-content/plugins/oasis-workflow/includes/pages/workflow-assignment-report.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'OW_Workflow_Service' not found in wp-content/plugins/oasis-workflow/includes/pages/subpages/history-graphic.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/oasis-workflow/includes/pages/subpages/workflow-create-popup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/oasis-workflow/includes/pages/subpages/submit-step.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'OW_Process_Flow' not found in wp-content/plugins/oasis-workflow/includes/pages/subpages/action-comments.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/oasis-workflow/oasiswf.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oasis-workflow/includes/api/api-workflow.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/oasis-workflow/includes/pages/subpages/step-info-content.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Visual Work flow designer - 2 step review process), #2 (Workflow example - Simple 1 step review process), #3 (More examples.. of the workflow designer), #4 (Role-based routing), #5 (Inbox - all you care about are the tasks assigned to you.), #6 (Sign off - complete the tasks by signing off and move the article to the next step.), #7 (Process history lets users retrace their steps), #8 (Custom statuses)
  • Tags: Please reduce the number of tags, currently 29 tag instead of maximum 10
The official readme.txt is a good inspiration

oasis-workflow/oasiswf.php 85% from 13 tests

The entry point to "Oasis Workflow" version 6.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("oasis-workflow.php" instead of "oasiswf.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected50,779 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
JSON100018,224
PHP522,3683,89111,739
JavaScript471,2711,5629,771
PO File84,1966,9128,838
CSS8282842,184
Sass14023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity61.43
▷ Minimum class complexity1.00
▷ Maximum class complexity546.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods369
▷ Static methods82.17%
▷ Public methods31184.28%
▷ Protected methods00.00%
▷ Private methods5815.72%
Functions23
▷ Named functions00.00%
▷ Anonymous functions23100.00%
Constants20
▷ Global constants1365.00%
▷ Class constants735.00%
▷ Public constants7100.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
40 PNG files occupy 0.30MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/arrows-dark.png0.48KB0.24KB▼ 51.11%
css/lib/calendar/images/ui-bg_gloss-wave_35_f6a828_500x100.png3.67KB1.93KB▼ 47.53%
css/lib/calendar/images/ui-bg_glass_100_fdf5ce_1x400.png0.12KB0.16KB0.00%
img/edit-icon-32.png2.00KB1.10KB▼ 45.27%
img/page_white_delete.png0.52KB0.51KB▼ 2.24%