83% delete-original-image

Code Review | Delete Original Image

WordPress plugin Delete Original Image scored 83% from 54 tests.

About plugin

  • Plugin page: delete-original-i...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Oct 7, 2014
  • Latest release: Jun 18, 2017
  • Number of updates: 10
  • Update frequency: every 98.6 days
  • Top authors: com82 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

800+ active / 4,923 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.50ms] Passed 4 tests

Analyzing server-side resources used by Delete Original Image
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.41 ▼6.59
Dashboard /wp-admin3.34 ▲0.0348.10 ▲0.14
Posts /wp-admin/edit.php3.39 ▲0.0347.85 ▼0.81
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.57 ▼6.74
Media Library /wp-admin/upload.php3.26 ▲0.0338.55 ▲4.99
Delete Original Images /wp-admin/tools.php?page=delete_original_image3.2333.06

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Delete Original Image
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.41 ▲0.031.65 ▼0.2643.33 ▼10.82
Dashboard /wp-admin2,210 ▲194.91 ▼0.99105.21 ▲1.6736.10 ▼4.72
Posts /wp-admin/edit.php2,093 ▲71.98 ▼0.0242.65 ▲4.6235.86 ▲3.71
Add New Post /wp-admin/post-new.php1,550 ▲818.03 ▼0.30616.77 ▼2.5791.99 ▲34.95
Media Library /wp-admin/upload.php1,392 ▲44.34 ▲0.1397.95 ▼14.2941.91 ▼1.30
Delete Original Images /wp-admin/tools.php?page=delete_original_image8502.1924.6327.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_settings_errors() in wp-content/plugins/delete-original-image/views/admin-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/delete-original-image/delete-original-image.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === delete-original-image === )
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot1.png), #2 (screenshot2.png)
  • Donate link: Invalid URI found ("")
The official readme.txt might help

delete-original-image/delete-original-image.php 77% from 13 tests

This is the main PHP file of "Delete Original Image" version 0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")
  • Description: Please keep the plugin description shorter than 140 characters (currently 279 characters long)
  • Domain Path: Please prefix the domain path with a forward slash character ("/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin233 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP38773194
Markdown126039

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin