89% delete-old-posts-and-pictures

Code Review | Delete Old Posts and Pictures

WordPress plugin Delete Old Posts and Pictures scored89%from 54 tests.

About plugin

  • Plugin page: delete-old-posts-...
  • Plugin version: 2.1.4
  • PHP compatiblity: 8.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.3
  • WordPress version: 6.3.1
  • First release: Aug 12, 2023
  • Latest release: Aug 12, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: wizehawk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /216 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Delete Old Posts and Pictures
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.97 ▲0.88
Dashboard /wp-admin3.31 ▲0.0058.95 ▲7.56
Posts /wp-admin/edit.php3.36 ▲0.0048.68 ▼5.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.42 ▼28.97
Media Library /wp-admin/upload.php3.23 ▲0.0034.80 ▼3.06

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • Illegal file modification detected: 1 file (0.00KB) outside of "wp-content/plugins/delete-old-posts-and-pictures/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/delete-old-posts-and-pictures/Delete-Old-Posts-and-Pictures-\342\200\271-Wizehawk-Testing-Site-\342\200\224-WordPress.png"
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Delete Old Posts and Pictures
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.051.91 ▲0.3343.71 ▲2.92
Dashboard /wp-admin2,192 ▲125.51 ▼0.1291.30 ▼3.6839.79 ▼7.15
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0335.21 ▼4.8134.78 ▼4.90
Add New Post /wp-admin/post-new.php1,526 ▼023.30 ▼0.27682.94 ▲52.7557.84 ▼2.15
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0099.18 ▼9.1843.03 ▼2.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: delete, old pictures, old posts

delete-old-posts-and-pictures/Delete Old Posts and Pictures.php 92% from 13 tests

Analyzing the main PHP file in "Delete Old Posts and Pictures" version 2.1.4
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("delete-old-posts-and-pictures.php" instead of "Delete Old Posts and Pictures.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191165

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Delete-Old-Posts-and-Pictures-‹-Wizehawk-Testing-Site-—-WordPress.png18.75KB12.80KB▼ 31.73%