84% post-status-indicator

Code Review | Post Status Indicator

WordPress plugin Post Status Indicator scored 84% from 54 tests.

About plugin

  • Plugin page: post-status-indic...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.6
  • WordPress version: 5.8.1
  • First release: Jan 1, 2021
  • Latest release: Jan 7, 2021
  • Number of updates: 8
  • Update frequency: every 1.0 days
  • Top authors: seanchayes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 143 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼140.05ms] Passed 4 tests

Server-side resources used by Post Status Indicator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1240.46 ▲20.32
Dashboard /wp-admin3.07 ▲0.0144.34 ▲4.76
Posts /wp-admin/edit.php3.15 ▲0.0440.57 ▼5.33
Add New Post /wp-admin/post-new.php5.43 ▼0.0086.71 ▼562.60
Media Library /wp-admin/upload.php3.01 ▲0.0134.51 ▲2.98

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Post Status Indicator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12715.88 ▲0.339.34 ▼2.2042.51 ▼4.20
Dashboard /wp-admin2,990 ▲566.12 ▲0.18136.25 ▼13.06115.89 ▲2.33
Posts /wp-admin/edit.php2,762 ▲232.71 ▲0.0070.54 ▲7.9193.62 ▲6.30
Add New Post /wp-admin/post-new.php1,689 ▼2,03718.94 ▲3.82378.54 ▼80.92112.38 ▲2.05
Media Library /wp-admin/upload.php1,827 ▲205.04 ▼0.00151.61 ▲4.40120.40 ▲3.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'psi_remove_psi_options' not found or invalid function name

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/post-status-indicator/post-status-indicator.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (The Post Status Indicator sample posts displaying color changes), #2 (The Post Status Indicator settings page)
You can look at the official readme.txt

post-status-indicator/post-status-indicator.php 92% from 13 tests

The principal PHP file in "Post Status Indicator" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
No dangerous file extensions were detected10,814 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JSON30010,014
JavaScript103787570
PHP13931182
Markdown115043
CSS1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants5
▷ Global constants5100.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