84% additional-authors

Code Review | Additional Authors

WordPress plugin Additional Authors scored 84% from 54 tests.

About plugin

  • Plugin page: additional-authors
  • Plugin version: 1.2.12
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.9.2
  • First release: May 11, 2017
  • Latest release: Jul 22, 2021
  • Number of updates: 31
  • Update frequency: every 50.1 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,420 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▼290.32ms] Passed 4 tests

Server-side resources used by Additional Authors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3159.95 ▲3.62
Dashboard /wp-admin3.67 ▲0.2537.75 ▲4.61
Posts /wp-admin/edit.php3.89 ▲0.2543.41 ▲5.74
Add New Post /wp-admin/post-new.php7.15 ▲0.18100.35 ▼1,170.92
Media Library /wp-admin/upload.php3.61 ▲0.3126.24 ▲1.43

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 47 new files
Database: 1 new table, no new options
New tables
wp_additional_authors

Browser metrics Passed 4 tests

Additional Authors: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4116.23 ▲0.546.66 ▲0.322.54 ▲0.08
Dashboard /wp-admin2,895 ▲346.02 ▼0.16118.49 ▼19.26157.12 ▼9.19
Posts /wp-admin/edit.php2,704 ▲103.24 ▲0.0162.66 ▼2.50140.70 ▼5.74
Add New Post /wp-admin/post-new.php1,681 ▲2017.61 ▲1.60433.26 ▲22.82154.17 ▼3.94
Media Library /wp-admin/upload.php1,698 ▲35.55 ▲0.04137.39 ▼5.75184.37 ▼8.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_additional_authors

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'AdditionalAuthors\\Plugin' not found in wp-content/plugins/additional-authors/deprecated.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_author_meta() in wp-content/plugins/additional-authors/templates/additional-authors-the-author-posts-link.tpl.php:7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/additional-authors/templates/additional-authors-the-authors-posts-links.tpl.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/additional-authors/public-functions.php:60
    • > PHP Notice
      Undefined variable: additional_authors_ids in wp-content/plugins/additional-authors/templates/additional-authors-the-authors-posts-links.tpl.php on line 7
    • > PHP Notice
      Undefined variable: additional_authors_ids in wp-content/plugins/additional-authors/templates/additional-authors-the-authors.tpl.php on line 10
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/additional-authors/templates/additional-authors-the-authors.tpl.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'ph_user_destination' not found in wp-content/plugins/additional-authors/inc/migrate.additional-author-destination.php:3

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: author, meta fields

additional-authors/additional-authors.php 92% from 13 tests

The principal PHP file in "Additional Authors" v. 1.2.12 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,442 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP293515931,297
CSS214298
PO File1101145
JavaScript2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes00.00%
Methods93
▷ Static methods88.60%
▷ Public methods8793.55%
▷ Protected methods00.00%
▷ Private methods66.45%
Functions12
▷ Named functions758.33%
▷ Anonymous functions541.67%
Constants31
▷ Global constants00.00%
▷ Class constants31100.00%
▷ Public constants31100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected