99% pending-inidicator

Code Review | Pending Indicator

WordPress plugin Pending Indicator scored 99% from 54 tests.

About plugin

  • Plugin page: pending-inidicator
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 5.8.1
  • First release: Dec 17, 2013
  • Latest release: Dec 18, 2013
  • Number of updates: 18
  • Update frequency: every 0.1 days
  • Top authors: keha76 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 1,571 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by Pending Indicator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1231.62 ▲10.61
Dashboard /wp-admin3.07 ▲0.0144.37 ▲2.55
Posts /wp-admin/edit.php3.12 ▲0.0147.42 ▲0.95
Add New Post /wp-admin/post-new.php5.43 ▼0.01127.10 ▼535.52
Media Library /wp-admin/upload.php3.01 ▲0.0144.66 ▲13.75

Server storage [IO: ▲0.05MB] [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, no new options

Browser metrics Passed 4 tests

Pending Indicator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,695 ▲9916.32 ▲0.977.17 ▼0.6652.71 ▼4.05
Dashboard /wp-admin2,986 ▲525.90 ▼0.03135.22 ▼13.60116.96 ▲5.39
Posts /wp-admin/edit.php2,755 ▲162.69 ▼0.0076.72 ▲7.25102.39 ▲18.37
Add New Post /wp-admin/post-new.php1,695 ▲19518.79 ▼0.00458.28 ▲87.20125.85 ▲11.51
Media Library /wp-admin/upload.php1,823 ▲135.02 ▼0.09150.78 ▲10.61119.47 ▼6.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (Pending indicator in admin menu) image required
The official readme.txt is a good inspiration

pending-inidicator/pending-indicator.php 92% from 13 tests

This is the main PHP file of "Pending Indicator" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pending-inidicator.php" instead of "pending-indicator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin30 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1123330

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.54
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png9.29KB2.86KB▼ 69.24%