84% auto-publish-drafts

Code Review | Auto Publish Drafts

WordPress plugin Auto Publish Drafts scored84%from 54 tests.

About plugin

  • Plugin page: auto-publish-drafts
  • Plugin version: 1.1
  • PHP compatiblity: 5.6 or later+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 6.3.1
  • First release: Feb 2, 2022
  • Latest release: Feb 2, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wongsiongkiat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,349 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.74ms] Passed 4 tests

A check of server-side resources used by Auto Publish Drafts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.42 ▼3.39
Dashboard /wp-admin3.32 ▲0.0145.73 ▼4.99
Posts /wp-admin/edit.php3.37 ▲0.0148.18 ▼1.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.39 ▼0.90
Media Library /wp-admin/upload.php3.24 ▲0.0134.74 ▲3.08

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Auto Publish Drafts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.334.45 ▲2.8439.85 ▼4.78
Dashboard /wp-admin2,206 ▲274.85 ▼0.07112.97 ▼3.7942.94 ▼1.70
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0438.87 ▲1.0735.01 ▲1.24
Add New Post /wp-admin/post-new.php1,545 ▲2618.27 ▼5.14619.85 ▼54.0251.83 ▼6.10
Media Library /wp-admin/upload.php1,391 ▲94.19 ▼0.0598.62 ▼2.4541.62 ▼0.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/auto-publish-drafts/auto-publish-drafts.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt might help

auto-publish-drafts/auto-publish-drafts.php 92% from 13 tests

Analyzing the main PHP file in "Auto Publish Drafts" version 1.1
Please take the time to fix the following:
  • Requires PHP: Required version number should only contain digits separated by dots (ex. "7.0" instead of "5.6 or later")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected318 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin