10% rackspace-cloud-files-cdn

Code Review | Rackspace CDN

WordPress plugin Rackspace CDN scored10%from 54 tests.

About plugin

  • Plugin page: rackspace-cloud-f...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.0
  • WordPress version: 6.3.1
  • First release: May 1, 2014
  • Latest release: Oct 14, 2014
  • Number of updates: 53
  • Update frequency: every 3.8 days
  • Top authors: paypromedia (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

70+ active /6,307 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/rackspace-cloud-files-cdn/rackspace-cdn.php+64
    Undefined variable: _SESSION

Server metrics [RAM: ▲0.27MB] [CPU: ▲294.52ms] 75% from 4 tests

A check of server-side resources used by Rackspace CDN
It is recommended to improve the following
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 294.52ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.491,416.16 ▲1,376.12
Dashboard /wp-admin3.50 ▲0.1948.60 ▼4.14
Posts /wp-admin/edit.php3.61 ▲0.2552.30 ▼3.29
Add New Post /wp-admin/post-new.php6.33 ▲0.441,296.74 ▲1,187.65
Media Library /wp-admin/upload.php3.42 ▲0.1938.39 ▼2.16

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 234 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
wp_rs_cdn_settings
theysaidso_admin_options

Browser metrics Passed 4 tests

Rackspace CDN: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7614.27 ▼0.351.78 ▲0.0637.31 ▼11.18
Dashboard /wp-admin2,213 ▲365.65 ▲0.0792.86 ▲4.1536.54 ▼4.23
Posts /wp-admin/edit.php2,133 ▲332.23 ▲0.2840.27 ▲0.0239.03 ▼1.10
Add New Post /wp-admin/post-new.php1,542 ▲1623.14 ▼0.44663.13 ▲7.7960.90 ▲4.22
Media Library /wp-admin/upload.php1,420 ▲204.22 ▲0.03100.67 ▲2.0944.04 ▼1.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/rackspace-cloud-files-cdn/rackspace-cdn.php
    • > /wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/smoketest.php
  • 106× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\CloudMonitoring\\Exception\\CloudMonitoringException' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/CloudMonitoring/Exception/CheckException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\Service' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/Common/Nova.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\PersistentObject' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/Volume/Volume.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\PersistentObject' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/LoadBalancer/AllowedDomain.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\ObjectStore\\ObjectStoreBase' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/ObjectStore/Service.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\CloudMonitoring\\Exception\\CloudMonitoringException' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/CloudMonitoring/Exception/ServiceException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\CloudMonitoring\\Exception\\CloudMonitoringException' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/CloudMonitoring/Exception/NotificationPlanException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\Base' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/Common/Request/Response/Http.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\Common\\Base' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/Common/PersistentObject.php:66
    • > PHP Fatal error
      Uncaught Error: Class 'OpenCloud\\CloudMonitoring\\Exception\\CloudMonitoringException' not found in wp-content/plugins/rackspace-cloud-files-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/CloudMonitoring/Exception/AgentException.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Admin page when all files are synced.), #2 (Admin page when there files that need synced.), #3 (Admin page while syncing files in real-time.)
Please take inspiration from this readme.txt

rackspace-cloud-files-cdn/rackspace-cdn.php 92% from 13 tests

The main PHP file in "Rackspace CDN" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rackspace-cloud-files-cdn.php" instead of "rackspace-cdn.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin8,730 lines of code in 223 files:
LanguageFilesBlank linesComment linesLines of code
PHP2142,0955,2428,215
JavaScript13042262
Markdown3680189
JSON11024
XML14016
Bourne Shell271115
YAML1009

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity3.98
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces17
Interfaces2
Traits0
Classes204
▷ Abstract classes94.41%
▷ Concrete classes19595.59%
▷ Final classes00.00%
Methods544
▷ Static methods122.21%
▷ Public methods49290.44%
▷ Protected methods315.70%
▷ Private methods213.86%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants94
▷ Global constants8085.11%
▷ Class constants1414.89%
▷ 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
3 PNG files occupy 0.22MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png75.06KB25.57KB▼ 65.94%
screenshot-3.png79.31KB27.03KB▼ 65.92%
screenshot-1.png65.96KB22.18KB▼ 66.37%