84% correct-image-orientation

Code Review | Correct Image Orientation

WordPress plugin Correct Image Orientation scored84%from 54 tests.

About plugin

  • Plugin page: correct-image-ori...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2023
  • Latest release: Aug 14, 2023
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: cristian246 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /57 total downloads


Plugin footprint 83% 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: ▲0.00MB] [CPU: ▼7.30ms] Passed 4 tests

This is a short check of server-side resources used by Correct Image Orientation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.11 ▲0.71
Dashboard /wp-admin3.31 ▲0.0148.98 ▼2.43
Posts /wp-admin/edit.php3.36 ▲0.0047.39 ▼1.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0080.56 ▼25.98
Media Library /wp-admin/upload.php3.24 ▲0.0036.13 ▲3.18

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Correct Image Orientation
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.174.47 ▲2.7040.81 ▲1.40
Dashboard /wp-admin2,206 ▲175.83 ▼0.02100.58 ▼6.8438.74 ▼8.68
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0035.12 ▲0.5331.10 ▼4.59
Add New Post /wp-admin/post-new.php1,533 ▲523.50 ▲0.32668.42 ▼9.5762.25 ▲11.29
Media Library /wp-admin/upload.php1,382 ▼64.15 ▼0.0196.81 ▼0.6641.21 ▼2.69

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-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/correct-image-orientation/correct-image-orientation.php:40

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, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: iphone, orientation, upload, images, exif

correct-image-orientation/correct-image-orientation.php Passed 13 tests

"Correct Image Orientation" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
99 characters long description:
This plugin corrects the orientation of images uploaded from an iPhone based on their EXIF metadata

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin31 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected