68% show-all-draft-posts-and-pages

Code Review | Show All Draft Posts And Pages

WordPress plugin Show All Draft Posts And Pages scored68%from 54 tests.

About plugin

  • Plugin page: show-all-draft-po...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2013
  • Latest release: Oct 18, 2013
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Dostogir (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,275 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.71ms] Passed 4 tests

Server-side resources used by Show All Draft Posts And Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.38 ▼35.99
Dashboard /wp-admin2.08 ▼1.225.80 ▼47.52
Posts /wp-admin/edit.php2.08 ▼1.285.56 ▼43.68
Add New Post /wp-admin/post-new.php2.08 ▼3.816.04 ▼91.66
Media Library /wp-admin/upload.php2.08 ▼1.154.86 ▼31.22
Show All Draft Posts /wp-admin/options-general.php?page=show-all-draft-posts-and-pages/show_draft_posts.php2.085.47

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Show All Draft Posts And Pages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▲0.072.94 ▲1.1144.91 ▲4.01
Dashboard /wp-admin2,199 ▲225.58 ▲0.0193.46 ▼6.5343.35 ▼3.92
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0235.82 ▼3.0338.72 ▲2.59
Add New Post /wp-admin/post-new.php1,531 ▲323.11 ▲0.00642.80 ▼5.9252.33 ▼1.01
Media Library /wp-admin/upload.php1,407 ▲74.15 ▼0.0498.00 ▼8.5544.38 ▼3.41
Show All Draft Posts /wp-admin/options-general.php?page=show-all-draft-posts-and-pages/show_draft_posts.php8852.0023.4924.40

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
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=show-all-draft-posts-and-pages/show_draft_posts.php
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
    • > GET request to /wp-admin/options-general.php?page=show-all-draft-posts-and-pages/show_draft_posts.php
    • > Notice in wp-content/plugins/show-all-draft-posts-and-pages/show_draft_posts.php+70
    Undefined index: id

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-all-draft-posts-and-pages/show_draft_posts.php:38

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 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Widget configuration options), #2 (Sample output)
You can look at the official readme.txt

show-all-draft-posts-and-pages/show_draft_posts.php 85% from 13 tests

The main file in "Show All Draft Posts And Pages" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("show-all-draft-posts-and-pages.php" instead of "show_draft_posts.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 309 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin83 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19883

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.47KB9.17KB▼ 40.70%
screenshot-2.png2.27KB1.27KB▼ 43.93%