90% cf-images

Code Review | Offload, AI & Optimize with Cloudflare Images

WordPress plugin Offload, AI & Optimize with Cloudflare Images scored90%from 54 tests.

About plugin

  • Plugin page: cf-images
  • Plugin version: 1.7.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Sep 5, 2022
  • Latest release: Dec 3, 2023
  • Number of updates: 24
  • Update frequency: every 18.9 days
  • Top authors: vanyukov (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

1,000+ active /8,362 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.54ms] Passed 4 tests

An overview of server-side resources used by Offload, AI & Optimize with Cloudflare Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1841.68 ▲1.56
Dashboard /wp-admin3.47 ▲0.1250.77 ▼9.56
Posts /wp-admin/edit.php3.58 ▲0.2248.93 ▼2.65
Add New Post /wp-admin/post-new.php6.05 ▲0.1692.92 ▼11.52
Media Library /wp-admin/upload.php3.39 ▲0.1639.25 ▲3.37
Offload Settings /wp-admin/upload.php?page=cf-images3.3634.09

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 72 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Offload, AI & Optimize with Cloudflare Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.27 ▼0.371.57 ▼0.1636.68 ▼8.44
Dashboard /wp-admin2,202 ▲355.58 ▲0.0192.96 ▼21.1141.67 ▼2.38
Posts /wp-admin/edit.php2,101 ▼21.96 ▼0.0739.93 ▼8.2636.24 ▼3.08
Add New Post /wp-admin/post-new.php1,529 ▼123.22 ▲0.37585.09 ▼23.6351.95 ▼3.21
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.0795.28 ▼4.1539.17 ▼2.21
Offload Settings /wp-admin/upload.php?page=cf-images9462.5258.1738.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: optimize, cloudflare, cloudflare images, compress, offload images...

cf-images/cf-images.php Passed 13 tests

This is the main PHP file of "Offload, AI & Optimize with Cloudflare Images" version 1.7.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
64 characters long description:
Offload media library images to the `Cloudflare Images` service.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin3,396 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP459913,1723,168
Markdown1590174
SVG110050
CSS2222
JavaScript3042

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.93
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces7
Interfaces0
Traits3
Classes39
▷ Abstract classes410.26%
▷ Concrete classes3589.74%
▷ Final classes00.00%
Methods234
▷ Static methods104.27%
▷ Public methods15666.67%
▷ Protected methods3514.96%
▷ Private methods4318.38%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants7
▷ Global constants228.57%
▷ Class constants571.43%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin