84% image-rotation-fixer

Code Review | Image Rotation Fixer

WordPress plugin Image Rotation Fixer scored84%from 54 tests.

About plugin

  • Plugin page: image-rotation-fixer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Jun 17, 2012
  • Latest release: Nov 14, 2015
  • Number of updates: 8
  • Update frequency: every 155.6 days
  • Top authors: merty (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /30,867 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.71ms] Passed 4 tests

This is a short check of server-side resources used by Image Rotation Fixer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.01 ▼3.06
Dashboard /wp-admin3.32 ▲0.0244.60 ▼0.54
Posts /wp-admin/edit.php3.37 ▲0.0249.66 ▲3.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.33 ▲8.88
Media Library /wp-admin/upload.php3.25 ▲0.0237.14 ▲3.16

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Image Rotation Fixer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.131.76 ▲0.1043.64 ▼1.39
Dashboard /wp-admin2,195 ▲155.55 ▼0.1083.04 ▼5.3038.66 ▼5.15
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0539.91 ▼1.1336.86 ▲0.58
Add New Post /wp-admin/post-new.php1,537 ▲818.44 ▼5.04596.32 ▼86.4751.95 ▼1.50
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0494.74 ▼4.3941.41 ▼6.51

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-rotation-fixer/image-rotation-fixer.php:123

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: rotate, correct, exif, jpg, rotation...

image-rotation-fixer/image-rotation-fixer.php Passed 13 tests

The main file in "Image Rotation Fixer" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
126 characters long description:
Automatically fixes the rotation of JPEG images using PHP's EXIF extension, immediately after they are uploaded to the server.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected72 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1302172

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions3
▷ Named functions3100.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 files were detected