84% ra-new-post-auto-set-status-private

Code Review | RA - New Post Auto Set Status "Private"

WordPress plugin RA - New Post Auto Set Status "Private" scored84%from 54 tests.

About plugin

  • Plugin page: ra-new-post-auto-...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Sep 18, 2014
  • Latest release: May 14, 2015
  • Number of updates: 7
  • Update frequency: every 34.1 days
  • Top authors: skuramoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,309 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.00MB] [CPU: ▼12.07ms] Passed 4 tests

This is a short check of server-side resources used by RA - New Post Auto Set Status "Private"
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.48 ▼8.19
Dashboard /wp-admin3.31 ▼0.0345.51 ▼15.29
Posts /wp-admin/edit.php3.36 ▲0.0150.15 ▲4.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.06 ▼24.31
Media Library /wp-admin/upload.php3.24 ▲0.0135.02 ▼0.50

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: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for RA - New Post Auto Set Status "Private"
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼0.931.60 ▼0.3037.75 ▼5.34
Dashboard /wp-admin2,206 ▲185.88 ▲0.07109.38 ▲6.9537.98 ▼4.93
Posts /wp-admin/edit.php2,086 ▼62.05 ▲0.0440.14 ▲0.4035.02 ▲2.93
Add New Post /wp-admin/post-new.php1,533 ▲523.35 ▲5.21674.46 ▲45.7843.80 ▼12.04
Media Library /wp-admin/upload.php1,382 ▼94.24 ▲0.0797.67 ▼1.5940.31 ▼2.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

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
Please 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 plugin_basename() in wp-content/plugins/ra-new-post-auto-set-status-private/ra-newpost-status-auto-private.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
6 plugin tags: private, rains, publish, poststatus, default...

ra-new-post-auto-set-status-private/ra-newpost-status-auto-private.php 85% from 13 tests

The main PHP file in "RA - New Post Auto Set Status "Private"" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ra-new-post-auto-set-status-private.php" instead of "ra-newpost-status-auto-private.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin33 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File131122
PHP182311

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin