89% fix-image-rotation

Code Review | Fix Image Rotation

WordPress plugin Fix Image Rotation scored89%from 54 tests.

About plugin

  • Plugin page: fix-image-rotation
  • Plugin version: 2.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2015
  • Latest release: May 27, 2023
  • Number of updates: 22
  • Update frequency: every 130.9 days
  • Top authors: gagan0123 (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

6,000+ active /107,457 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Fix Image Rotation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.56 ▲3.01
Dashboard /wp-admin3.34 ▲0.0344.71 ▼4.08
Posts /wp-admin/edit.php3.39 ▲0.0344.37 ▼2.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0379.21 ▼27.12
Media Library /wp-admin/upload.php3.26 ▲0.0334.77 ▲1.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Fix Image Rotation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.091.73 ▲0.1244.16 ▲1.99
Dashboard /wp-admin2,209 ▲215.91 ▲0.0195.64 ▼12.5639.76 ▼5.42
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0033.21 ▼8.2430.30 ▼7.76
Add New Post /wp-admin/post-new.php1,514 ▼1917.51 ▼5.88642.90 ▼39.2559.33 ▲5.90
Media Library /wp-admin/upload.php1,385 ▼04.22 ▲0.0392.92 ▼7.3640.81 ▼6.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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
No output text or server-side errors detected on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: iphone, image rotation

fix-image-rotation/init.php 85% from 13 tests

The main PHP file in "Fix Image Rotation" ver. 2.2.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 334 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fix-image-rotation.php" instead of "init.php")

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
There were no executable files found in this plugin153 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP334194153

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin