84% co-authors-plus

Code Review | Co-Authors Plus

WordPress plugin Co-Authors Plus scored84%from 54 tests.

About plugin

  • Plugin page: co-authors-plus
  • Plugin version: 3.5.15
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Apr 24, 2009
  • Latest release: Aug 28, 2023
  • Number of updates: 231
  • Update frequency: every 22.7 days
  • Top authors: batmoo (48.05%)automattic (27.71%)danielbachhuber (22.94%)philipjohn (2.6%)

Code review

54 tests

User reviews

72 reviews

Install metrics

30,000+ active /990,101 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.84MB] [CPU: ▲4.32ms] Passed 4 tests

This is a short check of server-side resources used by Co-Authors Plus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8541.82 ▲0.45
Dashboard /wp-admin4.14 ▲0.8450.36 ▲1.58
Posts /wp-admin/edit.php4.20 ▲0.8452.34 ▲9.51
Add New Post /wp-admin/post-new.php6.74 ▲0.8688.17 ▲5.73
Media Library /wp-admin/upload.php4.07 ▲0.8442.94 ▲9.84
Guest Authors /wp-admin/users.php?page=view-guest-authors4.1336.79

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Co-Authors Plus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.26 ▲0.031.64 ▼0.0141.98 ▼1.46
Dashboard /wp-admin2,196 ▲255.52 ▼0.1182.48 ▼17.9736.50 ▼5.90
Posts /wp-admin/edit.php2,119 ▲162.21 ▲0.2039.10 ▲2.9636.76 ▲3.77
Add New Post /wp-admin/post-new.php1,725 ▲19722.21 ▼1.26667.54 ▲50.1436.82 ▼9.09
Media Library /wp-admin/upload.php1,401 ▲44.17 ▼0.0295.77 ▼5.8443.39 ▼1.30
Guest Authors /wp-admin/users.php?page=view-guest-authors1,0221.8324.6629.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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 50% 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 fix the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/screen.php): failed to open stream: No such file or directory in wp-content/plugins/co-authors-plus/php/class-coauthors-wp-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_coauthors() in wp-content/plugins/co-authors-plus/php/integrations/amp/meta-author.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/co-authors-plus/deprecated.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI' not found in wp-content/plugins/co-authors-plus/php/class-wp-cli.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/co-authors-plus/php/integrations/amp.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/co-authors-plus/deprecated.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Yoast\\WP\\SEO\\Generators\\Schema\\Author' not found in wp-content/plugins/co-authors-plus/php/integrations/yoast/class-coauthor.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/screen.php' (include_path='.:/usr/share/php') in wp-content/plugins/co-authors-plus/php/class-coauthors-wp-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CoAuthors\\Integrations\\add_action() in wp-content/plugins/co-authors-plus/php/integrations/yoast.php:32
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/co-authors-plus/php/class-coauthors-wp-list-table.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: publishing, authors, multi-author, users, co-authors...

co-authors-plus/co-authors-plus.php Passed 13 tests

The main PHP file in "Co-Authors Plus" ver. 3.5.15 adds more information about the plugin and also serves as the entry point for this plugin
136 characters long description:
Allows multiple authors to be assigned to a post. This plugin is an extended version of the Co-Authors plugin developed by Weston Ruter.

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
Success! There were no dangerous files found in this plugin8,526 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP141,0021,5404,187
PO File81,0311,1822,420
JavaScript9126151630
CSS56629577
Markdown41020429
JSX23996195
Cucumber315081
YAML1007

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.45
Average class complexity74.56
▷ Minimum class complexity6.00
▷ Maximum class complexity270.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods168
▷ Static methods148.33%
▷ Public methods15994.64%
▷ Protected methods63.57%
▷ Private methods31.79%
Functions28
▷ Named functions2692.86%
▷ Anonymous functions27.14%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.19MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/select2/select2.png0.60KB0.99KB0.00%
.wordpress-org/screenshot-2.png156.79KB36.56KB▼ 76.68%
.wordpress-org/icon-256x256.png6.67KB6.67KB0.00%
.wordpress-org/screenshot-1.png34.19KB10.28KB▼ 69.94%
lib/select2/select2x2.png0.83KB0.77KB▼ 6.15%