90% redirect-unattached-images

Code Review | Redirect Unattached Images

WordPress plugin Redirect Unattached Images scored90%from 54 tests.

About plugin

  • Plugin page: redirect-unattach...
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.2-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 26, 2015
  • Latest release: Jun 15, 2020
  • Number of updates: 15
  • Update frequency: every 125.3 days
  • Top authors: fatmedia (60%)ozzyr (46.67%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /3,131 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.73ms] Passed 4 tests

A check of server-side resources used by Redirect Unattached Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.57 ▼12.28
Dashboard /wp-admin3.31 ▼0.0346.46 ▼16.21
Posts /wp-admin/edit.php3.36 ▲0.0052.40 ▼0.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.39 ▼13.52
Media Library /wp-admin/upload.php3.23 ▲0.0042.20 ▲3.13

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Redirect Unattached Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.24 ▲0.071.46 ▼0.5138.25 ▼8.23
Dashboard /wp-admin2,192 ▲125.63 ▼0.0399.56 ▲7.3441.64 ▼0.08
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0140.79 ▲0.0538.21 ▲3.52
Add New Post /wp-admin/post-new.php1,529 ▼623.31 ▲5.18610.48 ▼18.2261.51 ▲0.65
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.03104.74 ▲6.6745.25 ▲3.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: galleries, 301, search engine optimization, redirect, images...

redirect-unattached-images/redirect-unattached-images.php Passed 13 tests

The main file in "Redirect Unattached Images" v. 0.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
84 characters long description:
Redirect attachment pages for all unattached images to the current site's home page.

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
No dangerous file extensions were detected57 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JSON10021
Markdown214019
PHP122917

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin