84% auto-cloudinary

Code Review | Auto Cloudinary

WordPress plugin Auto Cloudinary scored84%from 54 tests.

About plugin

  • Plugin page: auto-cloudinary
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Nov 14, 2017
  • Latest release: Aug 12, 2023
  • Number of updates: 32
  • Update frequency: every 65.6 days
  • Top authors: junaidbhura (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

300+ active /19,371 total downloads


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.01MB] [CPU: ▼3.88ms] Passed 4 tests

This is a short check of server-side resources used by Auto Cloudinary
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.58 ▲4.98
Dashboard /wp-admin3.31 ▲0.0147.38 ▼7.30
Posts /wp-admin/edit.php3.36 ▲0.0147.23 ▼1.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.06 ▼3.30
Media Library /wp-admin/upload.php3.23 ▲0.0135.33 ▼3.48
Cloudinary /wp-admin/tools.php?page=auto-cloudinary3.2534.17

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Auto Cloudinary
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.012.00 ▲0.3945.61 ▲0.50
Dashboard /wp-admin2,202 ▲255.60 ▼0.0686.37 ▼12.7239.17 ▼5.80
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0736.10 ▼2.1732.17 ▼7.43
Add New Post /wp-admin/post-new.php1,531 ▲623.06 ▼0.64656.85 ▼80.7854.03 ▼5.57
Media Library /wp-admin/upload.php1,407 ▲44.25 ▲0.0496.47 ▼9.4344.50 ▼4.85
Cloudinary /wp-admin/tools.php?page=auto-cloudinary9132.0329.7629.50

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/auto-cloudinary/admin/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function JB\\Cloudinary\\add_action() in wp-content/plugins/auto-cloudinary/inc/namespace.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function JB\\Cloudinary\\add_action() in wp-content/plugins/auto-cloudinary/inc/namespace.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (WordPress Options), #2 (Cloudinary Cloud Name), #3 (Cloudinary Auto Upload Setup)
The official readme.txt is a good inspiration

auto-cloudinary/auto-cloudinary.php 92% from 13 tests

The main file in "Auto Cloudinary" v. 1.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin569 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review 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.56
Average class complexity25.67
▷ Minimum class complexity6.00
▷ Maximum class complexity40.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods317.65%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions872.73%
▷ Anonymous functions327.27%
▷ 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
3 compressed PNG files occupy 0.19MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings