90% show-pending-comments-count

Code Review | Show Pending Comments Count

WordPress plugin Show Pending Comments Count scored 90% from 54 tests.

About plugin

  • Plugin page: show-pending-comm...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-4.2
  • WordPress version: 6.3.1
  • First release: Jun 12, 2009
  • Latest release: Aug 8, 2015
  • Number of updates: 15
  • Update frequency: every 150.9 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,321 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Show Pending Comments Count
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.57 ▼3.75
Dashboard /wp-admin3.31 ▲0.0043.86 ▼11.98
Posts /wp-admin/edit.php3.36 ▲0.0048.76 ▲0.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.08 ▼5.89
Media Library /wp-admin/upload.php3.23 ▲0.0033.85 ▲1.19

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Show Pending Comments Count
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.221.77 ▲0.1942.48 ▲3.05
Dashboard /wp-admin2,206 ▲185.86 ▲0.9892.75 ▼22.1537.77 ▼1.31
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0339.96 ▼2.3635.25 ▲1.57
Add New Post /wp-admin/post-new.php1,547 ▲2418.16 ▼5.15607.37 ▼69.8764.34 ▲0.78
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0294.05 ▼11.0340.42 ▼6.40

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
5 plugin tags: edit posts, coffee2code, comments, admin, pending comments

show-pending-comments-count/show-pending-comments-count.php Passed 13 tests

The main PHP file in "Show Pending Comments Count" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
101 characters long description:
Display the pending comments count next to the approved comments count in the admin listing of posts.

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
Good job! No executable or dangerous file extensions detected49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1206849

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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