78% unregistered-guest-authors-for-post-types

Code Review | Unregistered (Guest) Authors for post types

WordPress plugin Unregistered (Guest) Authors for post types scored 78% from 54 tests.

About plugin

  • Plugin page: unregistered-gues...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Oct 24, 2019
  • Latest release: Aug 17, 2020
  • Number of updates: 4
  • Update frequency: every 74.5 days
  • Top authors: primisdigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 364 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.13MB] [CPU: ▼327.85ms] Passed 4 tests

An overview of server-side resources used by Unregistered (Guest) Authors for post types
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1054.60 ▼26.95
Dashboard /wp-admin3.19 ▼0.2118.31 ▼24.12
Posts /wp-admin/edit.php3.19 ▼0.4520.33 ▼19.37
Add New Post /wp-admin/post-new.php3.19 ▼3.7818.19 ▼1,240.97
Media Library /wp-admin/upload.php3.19 ▼0.1015.96 ▼12.72
Add New /wp-admin/post-new.php?post_type=guest_authors3.1919.04
Guest author Settings /wp-admin/options-general.php?page=gap_menu_page3.1918.19
All Authors /wp-admin/edit.php?post_type=guest_authors3.1918.10

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Unregistered (Guest) Authors for post types
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,845 ▲11915.85 ▼0.175.96 ▼0.032.71 ▲0.39
Dashboard /wp-admin2,930 ▲766.09 ▼0.06119.91 ▼12.04154.66 ▼8.95
Posts /wp-admin/edit.php2,729 ▲353.24 ▲0.0170.10 ▲4.93139.42 ▼13.13
Add New Post /wp-admin/post-new.php1,659 ▼221.17 ▼1.58411.83 ▲4.22147.43 ▼13.89
Media Library /wp-admin/upload.php1,739 ▲445.50 ▼0.04143.97 ▲5.61187.78 ▼2.92
Add New /wp-admin/post-new.php?post_type=guest_authors3,0259.08165.20177.46
Guest author Settings /wp-admin/options-general.php?page=gap_menu_page1,0982.4160.62123.13
All Authors /wp-admin/edit.php?post_type=guest_authors1,4053.1660.25111.98

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
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=guest_authors
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/post-new.php?post_type=guest_authors
    • > Notice in wp-includes/capabilities.php+149
    Undefined offset: 0

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/unregistered-guest-authors-for-post-types/guest-authors-for-post-types.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: The official readme.txt is a good inspiration

unregistered-guest-authors-for-post-types/guest-authors-for-post-types.php 92% from 13 tests

"Unregistered (Guest) Authors for post types" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("unregistered-guest-authors-for-post-types.php" instead of "guest-authors-for-post-types.php")

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
Good job! No executable or dangerous file extensions detected3,574 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS31,37222,882
PHP44667692

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions17
▷ Named functions1588.24%
▷ Anonymous functions211.76%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected