10% collabpress

Code Review | CollabPress

WordPress plugin CollabPress scored 10% from 54 tests.

About plugin

  • Plugin page: collabpress
  • Plugin version: 1.3.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2010
  • Latest release: May 27, 2013
  • Number of updates: 53
  • Update frequency: every 34.4 days
  • Top authors: williamsba1 (45.28%)WDS-Scott (32.08%)ericlewis (22.64%)scottbasgaard (3.77%)cochran (3.77%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active / 72,213 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/collabpress/includes/cp-widgets.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; cp_widget_overview has a deprecated constructor

Server metrics [RAM: ▼1.48MB] [CPU: ▼52.87ms] Passed 4 tests

Server-side resources used by CollabPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.51 ▼0.968.01 ▼43.93
Dashboard /wp-admin2.53 ▼0.7811.10 ▼46.94
Posts /wp-admin/edit.php2.53 ▼0.839.92 ▼40.15
Add New Post /wp-admin/post-new.php2.53 ▼3.3611.27 ▼80.44
Media Library /wp-admin/upload.php2.53 ▼0.7010.05 ▼27.89
CollabPress /wp-admin/admin.php?page=collabpress-dashboard2.5310.19
Settings /wp-admin/admin.php?page=collabpress-settings2.538.77

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 115 new files
Database: 1 new table, 8 new options
New tables
wp_cp_project_users
New WordPress options
widget_theysaidso_widget
cp_version
widget_recent-posts
widget_cp_widget_overview
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for CollabPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲15213.86 ▼0.746.68 ▲4.6240.32 ▼3.06
Dashboard /wp-admin2,248 ▲455.93 ▲0.10116.22 ▲17.9584.98 ▲46.69
Posts /wp-admin/edit.php2,131 ▲422.11 ▲0.1138.52 ▲4.0134.68 ▲0.27
Add New Post /wp-admin/post-new.php1,542 ▲322.98 ▼0.56708.11 ▲103.5864.36 ▲7.60
Media Library /wp-admin/upload.php1,426 ▲384.28 ▲0.06101.50 ▲2.1788.10 ▲46.76
CollabPress /wp-admin/admin.php?page=collabpress-dashboard9422.0940.6047.43
Settings /wp-admin/admin.php?page=collabpress-settings1,4571.7626.5829.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/collabpress/includes/cp-widgets.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; cp_widget_overview has a deprecated constructor
  • Zombie tables detected upon uninstall: 1 table
    • wp_cp_project_users
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • cp_version
    • widget_cp_widget_overview
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=collabpress-settings
    • > Deprecated in wp-content/plugins/collabpress/includes/cp-widgets.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; cp_widget_overview has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=collabpress-settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in cp_widget_overview is deprecated since version 4.3.0! Use __construct() instead.
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=collabpress-settings
    • > Notice in wp-content/plugins/collabpress/includes/menus/settings.php+157
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=collabpress-settings
    • > Notice in wp-content/plugins/collabpress/includes/menus/settings-addons.php+13
    Undefined variable: plugins

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 44× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cp_project_links() in wp-content/plugins/collabpress/includes/templates/collabpress/content-single-project.php:3
    • > PHP Warning
      require_once(CP_PLUGIN_DIRincludes/template-tags.php): failed to open stream: No such file or directory in wp-content/plugins/collabpress/includes/functions.php on line 678
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/collabpress/includes/cp-widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cp_project_links() in wp-content/plugins/collabpress/includes/templates/collabpress/content-single-project-users.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cp_check_permissions() in wp-content/plugins/collabpress/includes/menus/settings.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'CP_PLUGIN_DIRincludes/tools/boones-pagination/boones-pagination.php' (include_path='.:/usr/share/php') in wp-content/plugins/collabpress/includes/templates/collabpress/projects-loop.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cp_overall_links() in wp-content/plugins/collabpress/includes/templates/collabpress/content-activity.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Component' not found in wp-content/plugins/collabpress/includes/cp-bp.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cp_has_projects() in wp-content/plugins/collabpress/includes/templates/collabpress/buddypress/dashboard.php:5
    • > PHP Warning
      require_once(CP_PLUGIN_DIRincludes/tools/boones-pagination/boones-pagination.php): failed to open stream: No such file or directory in wp-content/plugins/collabpress/includes/templates/collabpress/projects-loop.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (CollabPress Dashboard showing recent activity, users, overview, and more), #2 (Task list view showing active and completed tasks and who is assigned to each), #3 (Single task view with comments), #4 (Calendar view with tasks and due dates), #5 (Shortcode support example), #6 (BuddyPress Group integration)
  • Tags: You are using too many tags: 14 tag instead of maximum 10
Please take inspiration from this readme.txt

collabpress/cp-loader.php 92% from 13 tests

The principal PHP file in "CollabPress" v. 1.3.1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("collabpress.php" instead of "cp-loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,748 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP471,4401,5146,012
CSS83112212,026
JavaScript114572281,710

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity23.67
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods87
▷ Static methods00.00%
▷ Public methods87100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions155
▷ Named functions155100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
46 PNG files occupy 0.55MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/tools/fancybox/fancy_title_right.png0.49KB0.82KB0.00%
screenshot-2.png55.54KB21.75KB▼ 60.84%
includes/tools/fancybox/fancybox-x.png0.20KB0.31KB0.00%
includes/tools/fancybox/fancy_shadow_nw.png0.32KB0.47KB0.00%
includes/css/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%