58% deaddelete

Code Review | DeadDelete

WordPress plugin DeadDelete scored 58% from 54 tests.

About plugin

  • Plugin page: deaddelete
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2021
  • Latest release: Jan 22, 2022
  • Number of updates: 4
  • Update frequency: every 52.0 days
  • Top authors: paydelete (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 356 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.32ms] Passed 4 tests

A check of server-side resources used by DeadDelete
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.436.00 ▼34.99
Dashboard /wp-admin2.05 ▼1.2512.07 ▼37.30
Posts /wp-admin/edit.php2.05 ▼1.306.29 ▼44.88
Add New Post /wp-admin/post-new.php2.05 ▼3.846.41 ▼100.12
Media Library /wp-admin/upload.php2.05 ▼1.185.48 ▼27.39

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

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

Browser metrics Passed 4 tests

A check of browser resources used by DeadDelete
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.79 ▲0.561.81 ▲0.1345.35 ▼1.14
Dashboard /wp-admin2,203 ▲125.83 ▲0.7994.06 ▼9.2838.45 ▼4.06
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0338.00 ▼4.8735.58 ▼0.03
Add New Post /wp-admin/post-new.php1,542 ▼018.27 ▲0.10590.24 ▼7.5855.68 ▼7.50
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0095.18 ▼24.1840.37 ▼2.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function is_singular was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • deaddelete
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/deaddelete/public/partials/deaddelete-public-display.php
    • > /wp-content/plugins/deaddelete/admin/partials/deaddelete-admin-display.php
    • > /wp-content/plugins/deaddelete/index.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/deaddelete/includes/class-deaddelete-activator.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/deaddelete/includes/class-deaddelete-activator.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/deaddelete/includes/class-deaddelete-activator.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: content management, delete

deaddelete/deaddelete.php Passed 13 tests

The entry point to "DeadDelete" version 1.1.0 is a PHP file that has certain tags in its header comment area
98 characters long description:
The DeadDelete Plugin for Wordpress allows aggregators delete dead links at the click of a button.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin846 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP23338714820
CSS30813
JSON2007
JavaScript24546

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.08
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods60
▷ Static methods1728.33%
▷ Public methods5388.33%
▷ Protected methods00.00%
▷ Private methods711.67%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.06MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png24.75KB5.54KB▼ 77.61%
assets/icon-256x256.png41.41KB11.54KB▼ 72.13%