84% delete-pending-comments

Code Review | Delete Pending Comments

WordPress plugin Delete Pending Comments scored 84% from 54 tests.

About plugin

  • Plugin page: delete-pending-co...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-5.8
  • WordPress version: 6.3.1
  • First release: Oct 11, 2009
  • Latest release: Oct 13, 2021
  • Number of updates: 51
  • Update frequency: every 86.0 days
  • Top authors: nkuttler (86.27%)sudar (15.69%)

Code review

54 tests

User reviews

93 reviews

Install metrics

10,000+ active / 143,699 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.21ms] Passed 4 tests

This is a short check of server-side resources used by Delete Pending Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.43 ▼7.22
Dashboard /wp-admin3.33 ▲0.0247.47 ▲1.01
Posts /wp-admin/edit.php3.38 ▲0.0243.26 ▼4.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.26 ▼14.46
Media Library /wp-admin/upload.php3.25 ▲0.0234.85 ▲2.83
All Comments /wp-admin/edit-comments.php3.3136.77
Delete Pending Comments /wp-admin/edit-comments.php?page=delete-pending-comments3.2730.97

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Delete Pending Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8214.46 ▼0.131.68 ▼0.2941.57 ▼3.17
Dashboard /wp-admin2,226 ▲374.83 ▼0.06114.38 ▲3.2641.31 ▲1.22
Posts /wp-admin/edit.php2,109 ▲232.05 ▲0.0436.67 ▼1.4731.82 ▲1.73
Add New Post /wp-admin/post-new.php1,548 ▲623.22 ▲5.02671.40 ▲64.3855.18 ▼10.26
Media Library /wp-admin/upload.php1,408 ▲234.25 ▲0.0796.55 ▼6.1342.86 ▲0.64
All Comments /wp-admin/edit-comments.php1,8092.2835.5732.66
Delete Pending Comments /wp-admin/edit-comments.php?page=delete-pending-comments7712.0524.7423.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/delete-pending-comments/delete-pending-comments.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: mass delete comments, comments, delete, spam, pending

delete-pending-comments/delete-pending-comments.php 85% from 13 tests

"Delete Pending Comments" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("translations/")
  • Domain Path: Please prefix the domain path with a forward slash character ("/translations/")

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
No dangerous file extensions were detected165 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2152898
PO File1182067

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions4
▷ Named functions4100.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