94% wp-draft-published

Code Review | WP Draft Published

WordPress plugin WP Draft Published scored 94% from 53 tests.

About plugin

  • Plugin page: wp-draft-published
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 5.8.1
  • First release: Aug 7, 2019
  • Latest release: Aug 7, 2019
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: malithmcr (100%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 522 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼267.36ms] Passed 4 tests

An overview of server-side resources used by WP Draft Published
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1742.13 ▲20.59
Dashboard /wp-admin3.11 ▲0.0643.02 ▲0.92
Posts /wp-admin/edit.php3.16 ▲0.0639.59 ▼3.16
Add New Post /wp-admin/post-new.php5.48 ▲0.0590.00 ▼1,058.86
Media Library /wp-admin/upload.php3.06 ▲0.0530.65 ▼8.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Draft Published
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,664 ▲5815.91 ▲0.338.28 ▲1.2050.19 ▲3.61
Dashboard /wp-admin2,945 ▲955.90 ▲0.01134.35 ▼6.61103.61 ▲4.52
Posts /wp-admin/edit.php2,721 ▲152.69 ▼0.0165.20 ▲1.1186.54 ▼7.38
Add New Post /wp-admin/post-new.php1,667 ▼18618.82 ▼0.29352.07 ▼1.52113.96 ▲7.87
Media Library /wp-admin/upload.php1,787 ▲155.03 ▲0.02147.17 ▼12.18109.73 ▼3.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× 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/wp-draft-published/wpDraftPublished.php:35

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: draft post, draft, draft page, published draf, live drafts...

wp-draft-published/wpDraftPublished.php 92% from 13 tests

The main PHP script in "WP Draft Published" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-draft-published.php" instead of "wpDraftPublished.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
There were no executable files found in this plugin332 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35770305
Markdown113027

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.87
Average class complexity22.00
▷ Minimum class complexity8.00
▷ Maximum class complexity34.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.17MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png76.59KB24.19KB▼ 68.41%
screenshot-2.png93.78KB24.97KB▼ 73.38%