72% cloudimage

Code Review | Cloudimage

WordPress plugin Cloudimage scored72%from 54 tests.

About plugin

  • Plugin page: cloudimage
  • Plugin version: 3.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 24, 2018
  • Latest release: Jul 3, 2023
  • Number of updates: 157
  • Update frequency: every 12.7 days
  • Top authors: cloudimage (56.05%)cloudimageio (33.12%)scaleflex (12.1%)

Code review

54 tests

User reviews

8 reviews

Install metrics

900+ active /31,713 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼14.43ms] Passed 4 tests

Server-side resources used by Cloudimage
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2844.46 ▲0.88
Dashboard /wp-admin3.48 ▲0.1334.08 ▼27.15
Posts /wp-admin/edit.php3.54 ▲0.1839.56 ▼6.72
Add New Post /wp-admin/post-new.php5.72 ▼0.1768.90 ▼23.44
Media Library /wp-admin/upload.php3.48 ▲0.2534.54 ▼0.40
Advanced /wp-admin/admin.php?page=cloudimage-advanced3.4535.32
General /wp-admin/admin.php?page=cloudimage3.4529.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Cloudimage: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9114.24 ▲0.101.85 ▲0.1043.93 ▲2.69
Dashboard /wp-admin2,235 ▲555.66 ▼0.0081.90 ▼2.4657.41 ▲11.69
Posts /wp-admin/edit.php2,134 ▲342.01 ▲0.0034.39 ▼0.4733.67 ▼1.60
Add New Post /wp-admin/post-new.php1,713 ▲17622.57 ▲4.51664.59 ▼35.4461.19 ▼11.91
Media Library /wp-admin/upload.php1,440 ▲434.18 ▼0.0395.91 ▼4.8565.19 ▲21.68
Advanced /wp-admin/admin.php?page=cloudimage-advanced1,3462.0424.8253.66
General /wp-admin/admin.php?page=cloudimage1,0881.8223.3537.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cloudimage
    • > Notice in wp-content/plugins/cloudimage/admin/partials/cloudimage-admin-general-display.php+20
    Trying to access array offset on value of type bool

SRP 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cloudimage/public/partials/cloudimage-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cloudimage/includes/class-cloudimage-output-buffering.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cloudimage/admin/partials/cloudimage-admin-advanced-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cloudimage/admin/partials/cloudimage-admin-general-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Cloudimage website), #2 (Benchmark your images before and after Cloudimage), #3 (Plugin configuration page), #4 (Cloudimage Admin - Usage Statistics), #5 (Cloudimage Admin - Performance Statistics)
You can look at the official readme.txt

cloudimage/cloudimage.php Passed 13 tests

The main PHP script in "Cloudimage" version 3.2.1 is automatically included on every request by WordPress
63 characters long description:
The easiest way to deliver lightning fast images to your users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,152 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP154861,1391,513
CSS27718355
PO File1753222
JavaScript596640
YAML13022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity25.62
▷ Minimum class complexity1.00
▷ Maximum class complexity148.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods67
▷ Static methods22.99%
▷ Public methods4059.70%
▷ Protected methods57.46%
▷ Private methods2232.84%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/Cloudimage_BW.png0.61KB0.58KB▼ 5.89%
admin/images/Cloudimage_BW_128x128.png7.26KB5.28KB▼ 27.26%
admin/images/logo_new_cloudimage.png64.66KB33.02KB▼ 48.93%