78% delete-all-pending-comments

Code Review | Delete All Pending Comments

WordPress plugin Delete All Pending Comments scored78%from 54 tests.

About plugin

  • Plugin page: delete-all-pendin...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 22, 2013
  • Latest release: Jan 22, 2013
  • Number of updates: 12
  • Update frequency: every 21.2 days
  • Top authors: henrichro (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /5,841 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Delete All Pending Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.56 ▼5.85
Dashboard /wp-admin3.32 ▲0.0245.23 ▼9.51
Posts /wp-admin/edit.php3.37 ▲0.0251.64 ▲2.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.15 ▼20.33
Media Library /wp-admin/upload.php3.25 ▲0.0237.34 ▲1.50
All Comments /wp-admin/edit-comments.php3.3139.40
Pending Comments /wp-admin/edit-comments.php?page=delete-all-pending-comments3.2430.67

Server storage [IO: ▲0.00MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Delete All Pending Comments: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.75 ▼0.511.72 ▼0.1540.19 ▼2.32
Dashboard /wp-admin2,225 ▲364.89 ▼0.07110.67 ▼6.6537.25 ▼10.74
Posts /wp-admin/edit.php2,111 ▲221.98 ▼0.0439.47 ▲0.2834.97 ▲2.22
Add New Post /wp-admin/post-new.php1,547 ▲523.09 ▲4.85620.13 ▲14.1249.68 ▼0.50
Media Library /wp-admin/upload.php1,407 ▲224.22 ▲0.0196.71 ▼0.7641.80 ▼0.09
All Comments /wp-admin/edit-comments.php1,8142.3039.3933.82
Pending Comments /wp-admin/edit-comments.php?page=delete-all-pending-comments7802.0323.7624.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit-comments.php?page=delete-all-pending-comments
    • > Notice in wp-content/plugins/delete-all-pending-comments/dapc.php+40
    Undefined index: _wpnonce
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php?page=delete-all-pending-comments
    • > Notice in wp-content/plugins/delete-all-pending-comments/dapc.php+49
    Undefined index: dapc

SRP 50% from 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
Almost there! Just 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 plugin_dir_url() in wp-content/plugins/delete-all-pending-comments/dapc.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

delete-all-pending-comments/dapc.php 92% from 13 tests

The main PHP file in "Delete All Pending Comments" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("delete-all-pending-comments.php" instead of "dapc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16876
CSS1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Constants2
▷ Global constants2100.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 files were detected