83% one-click-delete

Code Review | One Click Delete

WordPress plugin One Click Delete scored83%from 54 tests.

About plugin

  • Plugin page: one-click-delete
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Mar 19, 2022
  • Latest release: Mar 19, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: mdedev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /485 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.27ms] Passed 4 tests

Server-side resources used by One Click Delete
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.0640.79 ▼8.31
Dashboard /wp-admin3.68 ▲0.1152.56 ▼2.00
Posts /wp-admin/edit.php3.73 ▲0.0556.17 ▲4.58
Add New Post /wp-admin/post-new.php6.22 ▲0.0788.22 ▼11.66
Media Library /wp-admin/upload.php3.54 ▲0.0539.87 ▲0.88

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

One Click Delete: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.78 ▲0.221.72 ▼0.1345.54 ▼0.51
Dashboard /wp-admin2,199 ▲255.57 ▼0.0390.13 ▼11.4640.31 ▼5.52
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.1440.12 ▼1.4835.49 ▼0.55
Add New Post /wp-admin/post-new.php1,530 ▲417.79 ▲0.38682.22 ▲1.5967.28 ▲1.54
Media Library /wp-admin/upload.php1,407 ▲74.14 ▲0.01100.79 ▼12.1143.82 ▼4.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/one-click-delete/public/partials/delete-plugins-one-click-public-display.php
    • > /wp-content/plugins/one-click-delete/admin/partials/delete-plugins-one-click-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === one-click-delete === )
The official readme.txt is a good inspiration

one-click-delete/delete-plugins-one-click.php 85% from 13 tests

The primary PHP file in "One Click Delete" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("one-click-delete.php" instead of "delete-plugins-one-click.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
There were no executable files found in this plugin195 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12112517189
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2284.62%
▷ Protected methods00.00%
▷ Private methods415.38%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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