67% upstream

Code Review | UpStream: a Project Management Plugin for WordPress

WordPress plugin UpStream: a Project Management Plugin for WordPress scored67%from 54 tests.

About plugin

  • Plugin page: upstream
  • Plugin version: 2.0.9
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jan 27, 2017
  • Latest release: Nov 2, 2022
  • Number of updates: 254
  • Update frequency: every 8.3 days
  • Top authors: upstreamplugin (87.01%)andergmartins (13.39%)

Code review

54 tests

User reviews

72 reviews

Install metrics

800+ active /86,159 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲3.97MB] [CPU: ▲35.91ms] 75% from 4 tests

A check of server-side resources used by UpStream: a Project Management Plugin for WordPress
Please fix the following
  • RAM: Total memory usage should be kept under 10MB (currently 10.50MB on /wp-admin/admin.php?page=upstream_tasks)
PageMemory (MB)CPU Time (ms)
Home /6.79 ▲3.3363.94 ▲20.67
Dashboard /wp-admin7.48 ▲4.1794.60 ▲44.51
Posts /wp-admin/edit.php7.55 ▲4.2080.75 ▲36.46
Add New Post /wp-admin/post-new.php10.15 ▲4.27139.32 ▲42.05
Media Library /wp-admin/upload.php7.41 ▲4.1877.72 ▲44.47
Tags /wp-admin/edit-tags.php?taxonomy=upstream_tag&post_type=project7.4068.16
Milestone Categories /wp-admin/edit-tags.php?taxonomy=upst_milestone_category&post_type=upst_milestone7.4070.72
Projects /wp-admin/edit.php?post_type=project7.4877.18
Milestones /wp-admin/edit.php?post_type=upst_milestone7.4866.26
Clients /wp-admin/edit.php?post_type=client7.4767.83
Extensions /wp-admin/admin.php?page=upstream_extensions10.4188.17
Bugs /wp-admin/edit.php?post_type=project&page=bugs7.4066.58
Tasks /wp-admin/admin.php?page=upstream_tasks10.5086.67
Categories /wp-admin/edit-tags.php?taxonomy=project_category&post_type=project7.4067.15
Tasks /wp-admin/edit.php?post_type=project&page=tasks7.4067.26

Server storage [IO: ▲23.38MB] [DB: ▲0.02MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • Illegal file modification detected: 1 file (1.48KB) outside of "wp-content/plugins/upstream/" and "wp-content/uploads/"
    • (new file) wp-content/debug-upstream.log
Filesystem: 3,067 new files
Database: 1 new table, 21 new options
New tables
wp_upfs_files
New WordPress options
upstream_default_capabilities_set
upstream_general
upstream_tasks
widget_recent-posts
theysaidso_admin_options
_upstream_migration_finished_M0000001
_upstream_migration_finished_M0000002
db_upgraded
upstream_version
upstream:role_upstream_users:drop_edit_others_projects
...

Browser metrics Passed 4 tests

Checking browser requirements for UpStream: a Project Management Plugin for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲24414.39 ▲0.111.70 ▼0.0441.72 ▼1.23
Dashboard /wp-admin2,373 ▲1856.11 ▲1.19118.42 ▲0.9040.80 ▼3.97
Posts /wp-admin/edit.php2,274 ▲1853.05 ▲1.0250.75 ▲13.8740.29 ▲6.48
Add New Post /wp-admin/post-new.php1,648 ▲11318.00 ▼5.11620.93 ▲9.8934.51 ▼18.77
Media Library /wp-admin/upload.php1,565 ▲1805.24 ▲1.02100.29 ▼0.3645.23 ▼1.66
Tags /wp-admin/edit-tags.php?taxonomy=upstream_tag&post_type=project1,4162.7142.35116.59
Milestone Categories /wp-admin/edit-tags.php?taxonomy=upst_milestone_category&post_type=upst_milestone1,5773.1653.7556.15
Projects /wp-admin/edit.php?post_type=project1,5823.1551.9358.62
Milestones /wp-admin/edit.php?post_type=upst_milestone1,3222.9750.7360.17
Clients /wp-admin/edit.php?post_type=client1,3233.0644.2353.23
Extensions /wp-admin/admin.php?page=upstream_extensions1,2373.0552.9359.60
Bugs /wp-admin/edit.php?post_type=project&page=bugs1,3912.9037.6155.26
Tasks /wp-admin/admin.php?page=upstream_tasks2,5173.3570.2768.15
Categories /wp-admin/edit-tags.php?taxonomy=project_category&post_type=project1,4412.6837.9351.81
Tasks /wp-admin/edit.php?post_type=project&page=tasks1,3992.7638.7752.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_upfs_files
  • Zombie WordPress options were found after uninstall: 21 options
    • can_compress_scripts
    • upstream_default_capabilities_set
    • upstream:role_upstream_users:drop_edit_others_projects
    • _upstream_migration_finished_M0000002
    • widget_theysaidso_widget
    • upstream_tasks
    • upstream_projects
    • upstream:migration.comments
    • upstream_general
    • upstream:created_tasks_args_ids
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/upstream/includes/libraries/password_compat-1.0.4/version-test.php
  • 462× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Trait 'Symfony\\Component\\Debug\\Tests\\Fixtures\\InternalTrait2' not found in wp-content/plugins/upstream/vendor/symfony/debug/Tests/Fixtures/InternalClass.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/upstream/vendor/symfony/console/Tests/Fixtures/FoobarCommand.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pcntl_signal() in wp-content/plugins/upstream/vendor/symfony/process/Tests/SignalListener.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/upstream/vendor/symfony/console/Tests/Fixtures/FooOptCommand.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Tests\\Descriptor\\AbstractDescriptorTest' not found in wp-content/plugins/upstream/vendor/symfony/console/Tests/Descriptor/MarkdownDescriptorTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/upstream/vendor/symfony/console/Tests/Fixtures/FooSubnamespaced1Command.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' not found in wp-content/plugins/upstream/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/upstream/vendor/symfony/console/Tests/Helper/HelperTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Application' not found in wp-content/plugins/upstream/vendor/symfony/console/Tests/Fixtures/DescriptorApplicationMbString.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/upstream/includes/libraries/cmb2/includes/CMB2.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

upstream/upstream.php Passed 13 tests

"UpStream: a Project Management Plugin for WordPress" version 2.0.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
41 characters long description:
A Project Management Plugin for WordPress

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin264,284 lines of code in 2,732 files:
LanguageFilesBlank linesComment linesLines of code
PHP94820,32933,71688,245
PO File12619,38427,37645,554
JSON260043,864
JavaScript1314,4182,10623,616
YAML341299019,090
CSS564,2461,48118,348
SVG1,30305,16711,142
Sass18504344,144
LESS18502554,107
HTML37003,186
Markdown3577401,830
XML24262515
JSX157123255
C1528223
Twig69084
m41111141
C/C++ Header112840

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.84
▷ Minimum class complexity1.00
▷ Maximum class complexity259.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces111
Interfaces57
Traits9
Classes850
▷ Abstract classes445.18%
▷ Concrete classes80694.82%
▷ Final classes172.11%
Methods5,010
▷ Static methods4428.82%
▷ Public methods4,23584.53%
▷ Protected methods4999.96%
▷ Private methods2765.51%
Functions768
▷ Named functions43756.90%
▷ Anonymous functions33143.10%
Constants216
▷ Global constants5224.07%
▷ Class constants16475.93%
▷ Public constants164100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
26 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/libraries/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
includes/libraries/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
includes/admin/assets/img/datepicker/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/libraries/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
includes/libraries/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%