94% post-status-menu-items

Code Review | Post Status Menu Items

WordPress plugin Post Status Menu Items scored 94% from 54 tests.

About plugin

  • Plugin page: post-status-menu-...
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.0
  • WordPress version: 5.8.1
  • First release: Jan 12, 2012
  • Latest release: Dec 5, 2018
  • Number of updates: 74
  • Update frequency: every 34.0 days
  • Top authors: mrwweb (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active / 9,504 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼156.59ms] Passed 4 tests

This is a short check of server-side resources used by Post Status Menu Items
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1741.58 ▲11.51
Dashboard /wp-admin3.12 ▲0.0637.16 ▼13.94
Posts /wp-admin/edit.php3.17 ▲0.0649.01 ▼1.04
Add New Post /wp-admin/post-new.php5.47 ▲0.04100.82 ▼612.86
Media Library /wp-admin/upload.php3.06 ▲0.0640.08 ▲1.47
Published (1) /wp-admin/edit.php?post_status=publish&post_type=post3.1748.96

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
psmi_options

Browser metrics Passed 4 tests

Checking browser requirements for Post Status Menu Items
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲13115.86 ▲0.1412.18 ▲0.0849.77 ▼2.00
Dashboard /wp-admin3,013 ▲825.96 ▼0.29141.53 ▼10.81118.02 ▲3.64
Posts /wp-admin/edit.php2,748 ▲92.71 ▼0.0065.22 ▼8.8895.27 ▲6.57
Add New Post /wp-admin/post-new.php1,503 ▼118.86 ▲0.34393.86 ▼32.99119.27 ▲3.30
Media Library /wp-admin/upload.php1,814 ▼85.03 ▲0.02170.31 ▲8.21118.89 ▼3.80
Published (1) /wp-admin/edit.php?post_status=publish&post_type=post2,7482.7267.3490.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 | 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-status-menu-items/cms_post_status_menu.php:287

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: admin menu, wp admin, drafts, post status, post statuses

post-status-menu-items/cms_post_status_menu.php 92% from 13 tests

"Post Status Menu Items" version 1.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-status-menu-items.php" instead of "cms_post_status_menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin344 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1105146274
CSS182670

PHP code Passed 2 tests

An overview 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.36
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin