88% rackspace-cloudfiles-cdn

Code Review | Rackspace CloudFiles CDN

WordPress plugin Rackspace CloudFiles CDN scored 88% from 54 tests.

About plugin

  • Plugin page: rackspace-cloudfi...
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.8.1
  • First release: Sep 10, 2013
  • Latest release: Apr 7, 2014
  • Number of updates: 31
  • Update frequency: every 6.8 days
  • Top authors: richardroyal (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,889 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼133.83ms] Passed 4 tests

This is a short check of server-side resources used by Rackspace CloudFiles CDN
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.04 ▲0.3137.93 ▲16.41
Dashboard /wp-admin3.23 ▲0.1752.39 ▲10.49
Posts /wp-admin/edit.php3.29 ▲0.1745.34 ▲14.10
Add New Post /wp-admin/post-new.php5.51 ▲0.0790.76 ▼562.06
Media Library /wp-admin/upload.php3.10 ▲0.0932.63 ▲2.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 769 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Rackspace CloudFiles CDN
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,026 ▲43117.87 ▲2.2911.38 ▲1.4746.92 ▲0.00
Dashboard /wp-admin3,182 ▲2518.04 ▲1.92156.59 ▲15.00109.95 ▼1.24
Posts /wp-admin/edit.php2,993 ▲2544.24 ▲1.5280.58 ▲15.1494.61 ▼4.88
Add New Post /wp-admin/post-new.php1,632 ▲2821.28 ▲2.42251.18 ▼118.63123.43 ▲18.52
Media Library /wp-admin/upload.php1,845 ▲354.82 ▼0.21111.96 ▼34.31117.21 ▼3.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/rackspace-cloudfiles-cdn/rackspace-cloudfiles-cdn.php
    • > /wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/smoketest.php
  • 106× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\LoadBalancer\\Resources\\SubResource' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/LoadBalancer/Resources/HealthMonitor.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\Base' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/Common/Metadata.php:21
    • > PHP Notice
      Undefined index: NOVA_URL in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/smoketest.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\LoadBalancer\\Resources\\Readonly' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/LoadBalancer/Resources/Stats.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\CloudMonitoring\\Exception\\CloudMonitoringException' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/CloudMonitoring/Exception/EntityException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\PersistentObject' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/Compute/Network.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\ObjectStore\\ObjectStoreBase' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/ObjectStore/Service.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\LoadBalancer\\Resources\\SubResource' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/LoadBalancer/Resources/ContentCaching.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\PersistentObject' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/DNS/AsyncResponse.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\ova' not found in wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/Volume/Service.php:20

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Beautifully simple management), #2 (Example output in content)
You can look at the official readme.txt

rackspace-cloudfiles-cdn/rackspace-cloudfiles-cdn.php Passed 13 tests

This is the main PHP file of "Rackspace CloudFiles CDN" version 0.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
56 characters long description:
A plugin that moves attachments to Rackspace Cloudfiles.

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 plugin204,855 lines of code in 483 files:
LanguageFilesBlank linesComment linesLines of code
HTML2131,5620165,927
XML2196019,484
JavaScript121,8371,9298,180
PHP2162,0365,0167,622
Markdown331,15002,875
CSS39967719
JSON11024
Bourne Shell271115
YAML1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.85
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces17
Interfaces2
Traits0
Classes206
▷ Abstract classes94.37%
▷ Concrete classes19795.63%
▷ Final classes00.00%
Methods553
▷ Static methods152.71%
▷ Public methods50190.60%
▷ Protected methods315.61%
▷ Private methods213.80%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants99
▷ Global constants8585.86%
▷ Class constants1414.14%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
38 PNG files occupy 0.35MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/php-opencloud-1.5.10/docs/api/images/icons/arrow_down.png0.59KB0.58KB▼ 2.15%
lib/php-opencloud-1.5.10/docs/api/css/black-tie/images/ui-icons_4ca300_256x240.png4.27KB4.11KB▼ 3.78%
lib/php-opencloud-1.5.10/docs/api/images/background.png0.81KB0.72KB▼ 10.17%
lib/php-opencloud-1.5.10/docs/api/css/black-tie/images/ui-bg_flat_65_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
lib/php-opencloud-1.5.10/docs/api/images/icons/ok.png3.60KB0.90KB▼ 74.95%