84% cdn-image-proxy

Code Review | CDN Image Proxy

WordPress plugin CDN Image Proxy scored84%from 54 tests.

About plugin

  • Plugin page: cdn-image-proxy
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: Feb 16, 2018
  • Latest release: Feb 16, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: philip.newcomer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /768 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.07ms] Passed 4 tests

An overview of server-side resources used by CDN Image Proxy
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.45 ▼5.70
Dashboard /wp-admin3.32 ▲0.0249.17 ▼1.79
Posts /wp-admin/edit.php3.37 ▲0.0147.48 ▼1.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.55 ▼15.28
Media Library /wp-admin/upload.php3.24 ▲0.0133.44 ▼1.01

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for CDN Image Proxy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.24 ▼1.075.59 ▲3.8740.87 ▼9.03
Dashboard /wp-admin2,221 ▲335.80 ▲0.0195.49 ▼7.0841.04 ▲0.37
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0038.66 ▲2.0737.14 ▲3.23
Add New Post /wp-admin/post-new.php1,542 ▲1218.05 ▼0.06586.67 ▼37.8452.41 ▼0.56
Media Library /wp-admin/upload.php1,385 ▲34.19 ▼0.1095.99 ▼4.1441.17 ▼0.65

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PhilipNewcomer\\CDNImageProxy\\add_filter() in wp-content/plugins/cdn-image-proxy/src/filters.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PhilipNewcomer\\CDNImageProxy\\add_action() in wp-content/plugins/cdn-image-proxy/src/requirements.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PhilipNewcomer\\CDNImageProxy\\add_action() in wp-content/plugins/cdn-image-proxy/src/settings.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cdn-image-proxy/cdn-image-proxy.php:30

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

cdn-image-proxy/cdn-image-proxy.php 92% from 13 tests

The main file in "CDN Image Proxy" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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 plugin200 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP54696178
Markdown112022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
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
Namespaces1
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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