94% new-post-is-private

Code Review | New Post is Private

WordPress plugin New Post is Private scored 94% from 54 tests.

About plugin

  • Plugin page: new-post-is-private
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.9
  • WordPress version: 5.8.1
  • First release: May 8, 2014
  • Latest release: May 8, 2014
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: mohansandesh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 977 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼181.32ms] Passed 4 tests

This is a short check of server-side resources used by New Post is Private
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0038.56 ▼0.62
Dashboard /wp-admin3.06 ▲0.0151.72 ▼0.79
Posts /wp-admin/edit.php3.11 ▲0.0147.60 ▼1.32
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.70 ▼722.54
Media Library /wp-admin/upload.php3.00 ▲0.0038.02 ▲3.30

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by New Post is Private
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.28 ▲0.2317.47 ▲8.9044.80 ▼8.02
Dashboard /wp-admin2,973 ▲425.91 ▼0.24151.78 ▼33.82107.60 ▼4.05
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0164.34 ▼4.3293.58 ▼3.11
Add New Post /wp-admin/post-new.php1,676 ▲6119.15 ▼2.29426.02 ▲136.39109.29 ▼1.45
Media Library /wp-admin/upload.php1,807 ▼05.01 ▲0.02162.25 ▲7.31117.27 ▲2.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/new-post-is-private/new-post-is-private.php:18

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: private, private post, new post, visibility, visibility private

new-post-is-private/new-post-is-private.php Passed 13 tests

Analyzing the main PHP file in "New Post is Private" version 0.1
37 characters long description:
New posts will be private by default.

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
Everything looks great! No dangerous files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11611

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin