94% 5centscdn

Code Review | 5centsCDN - WordPress CDN Plugin

WordPress plugin 5centsCDN - WordPress CDN Plugin scored 94% from 54 tests.

About plugin

  • Plugin page: 5centscdn
  • Plugin version: 22.3.09
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9.1
  • WordPress version: 5.9.2
  • First release: Feb 13, 2020
  • Latest release: Mar 10, 2022
  • Number of updates: 12
  • Update frequency: every 63.2 days
  • Top authors: 5centscdn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 835 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.35MB] [CPU: ▼306.98ms] Passed 4 tests

Server-side resources used by 5centsCDN - WordPress CDN Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.06910.74 ▲858.53
Dashboard /wp-admin3.28 ▼0.1323.08 ▼10.09
Posts /wp-admin/edit.php3.34 ▼0.3028.71 ▼8.25
Add New Post /wp-admin/post-new.php6.07 ▼0.9078.31 ▼1,202.73
Media Library /wp-admin/upload.php3.29 ▼0.0223.43 ▼6.86

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 133 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 5centsCDN - WordPress CDN Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,893 ▲13916.32 ▲0.756.37 ▲0.192.72 ▲0.12
Dashboard /wp-admin2,965 ▲1047.18 ▲1.00127.89 ▼15.00172.97 ▲4.71
Posts /wp-admin/edit.php2,765 ▲773.79 ▲0.5683.86 ▲16.00158.62 ▲15.55
Add New Post /wp-admin/post-new.php1,818 ▲6620.40 ▼0.62448.14 ▼0.10243.15 ▲84.34
Media Library /wp-admin/upload.php1,769 ▲716.28 ▲0.76137.83 ▼0.50189.03 ▲2.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 43× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/promises/src/EachPromise.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/5centscdn/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/promises/src/Coroutine.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/5centscdn/vendor/guzzlehttp/psr7/src/Stream.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: bandwidth, cdn, content delivery network, performance

5centscdn/5centscdn.php 92% from 13 tests

"5centsCDN - WordPress CDN Plugin" version 22.3.09's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 513 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected14,185 lines of code in 122 files:
LanguageFilesBlank linesComment linesLines of code
PHP971,8894,9559,160
Markdown101,01803,233
JavaScript128627778
JSON800491
CSS1707479
SVG30025
Dockerfile18010
make1409

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.72
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces8
Interfaces15
Traits2
Classes68
▷ Abstract classes00.00%
▷ Concrete classes68100.00%
▷ Final classes913.24%
Methods662
▷ Static methods7611.48%
▷ Public methods54181.72%
▷ Protected methods60.91%
▷ Private methods11517.37%
Functions161
▷ Named functions7445.96%
▷ Anonymous functions8754.04%
Constants62
▷ Global constants711.29%
▷ Class constants5588.71%
▷ Public constants55100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/fivecent_logo.png3.60KB2.27KB▼ 36.76%
inc/menu-icon.png0.97KB0.76KB▼ 21.23%