68% author-discussion

Code Review | Author Discussion

WordPress plugin Author Discussion scored68%from 54 tests.

About plugin

  • Plugin page: author-discussion
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Dec 16, 2013
  • Latest release: Mar 11, 2014
  • Number of updates: 57
  • Update frequency: every 1.5 days
  • Top authors: aschx (98.25%)Otto42 (3.51%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,055 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.89MB] [CPU: ▼59.18ms] Passed 4 tests

This is a short check of server-side resources used by Author Discussion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.367.02 ▼34.02
Dashboard /wp-admin2.13 ▼1.226.52 ▼58.26
Posts /wp-admin/edit.php2.13 ▼1.238.48 ▼53.60
Add New Post /wp-admin/post-new.php2.13 ▼3.7611.08 ▼90.84
Media Library /wp-admin/upload.php2.13 ▼1.108.58 ▼28.05
Author Discussion /wp-admin/admin.php?page=author_discuss2.137.52
Settings /wp-admin/admin.php?page=author_discuss_settings2.139.81

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: 1 new table, 11 new options
New tables
wp_authordiscuss
New WordPress options
author_discussion_dashboard_limit
can_compress_scripts
author_discussion_drop_table
db_upgraded
author_discussion_msg_limit
author_discussion_version
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Author Discussion
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲14214.42 ▲0.222.36 ▲0.4346.41 ▲4.35
Dashboard /wp-admin2,274 ▲975.68 ▲0.0698.84 ▼7.9865.29 ▲24.56
Posts /wp-admin/edit.php2,137 ▲342.00 ▼0.0039.91 ▼7.2938.84 ▼2.60
Add New Post /wp-admin/post-new.php1,438 ▼9317.87 ▼5.261,052.10 ▲431.0575.60 ▲23.02
Media Library /wp-admin/upload.php1,427 ▲304.25 ▲0.04163.47 ▲59.57141.67 ▲98.22
Author Discussion /wp-admin/admin.php?page=author_discuss1,3225.67165.3099.61
Settings /wp-admin/admin.php?page=author_discuss_settings9921.7235.0346.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the auth_discuss_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 10 options in the database
    • author_discussion_dashboard_limit
    • widget_theysaidso_widget
    • can_compress_scripts
    • author_discussion_msg_limit
    • widget_recent-comments
    • author_discussion_drop_table
    • widget_recent-posts
    • author_discussion_capability
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=author_discuss_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the auth_discuss_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=author_discuss_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the auth_discuss_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=author_discuss_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the auth_discuss_scripts handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=author_discuss_settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the auth_discuss_scripts handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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 take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/author-discussion/admin/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/author-discussion/admin/auth-post.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/author-discussion/widgets/dashboard.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/author-discussion/admin/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/author-discussion/admin/install.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/author-discussion/admin/toolbar.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 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
4 plugin tags: discussion, communicate, admin, authors

author-discussion/author-discussion.php Passed 13 tests

The primary PHP file in "Author Discussion" version 0.2.2 is used by WordPress to initiate all plugin functionality
105 characters long description:
This plugin will create a page where authors, editors and administrators can communicate with their team.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin569 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP811674492
CSS111163
JavaScript12214

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png3.32KB0.75KB▼ 77.54%