72% aws-cdn-by-wpadmin

Code Review | WPAdmin AWS CDN

WordPress plugin WPAdmin AWS CDN scored72%from 54 tests.

About plugin

  • Plugin page: aws-cdn-by-wpadmin
  • Plugin version: 3.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-6.3
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Aug 10, 2023
  • Number of updates: 180
  • Update frequency: every 15.2 days
  • Top authors: luckychingi (100%)

Code review

54 tests

User reviews

51 reviews

Install metrics

1,000+ active /75,803 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼6.58ms] Passed 4 tests

A check of server-side resources used by WPAdmin AWS CDN
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3341.16 ▲4.17
Dashboard /wp-admin3.63 ▲0.2847.16 ▼16.23
Posts /wp-admin/edit.php3.73 ▲0.3748.42 ▼0.59
Add New Post /wp-admin/post-new.php6.34 ▲0.4585.84 ▼9.55
Media Library /wp-admin/upload.php3.57 ▲0.3437.69 ▲0.04
FAQ / How To /wp-admin/admin.php?page=wpa-aws-faq-how-to3.5034.06
WPAdmin CDN /wp-admin/admin.php?page=wpa-aws-setup3.510.01
Support Us /wp-admin/admin.php?page=wpa-aws-donate3.4936.99
SSL Manager /wp-admin/admin.php?page=wpa-aws-ssl3.5033.64

Server storage [IO: ▲48.21MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • Total filesystem usage must be limited to 25MB (currently using 48.21MB)
Filesystem: 1,895 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WPAdmin AWS CDN
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.63 ▲0.351.72 ▲0.0227.66 ▼10.93
Dashboard /wp-admin2,234 ▲575.59 ▲0.0480.83 ▼3.1642.59 ▲3.87
Posts /wp-admin/edit.php2,142 ▲452.03 ▲0.0641.07 ▲6.3036.61 ▲0.45
Add New Post /wp-admin/post-new.php1,558 ▲3223.22 ▼0.05675.19 ▼1.5760.03 ▲0.71
Media Library /wp-admin/upload.php1,442 ▲424.20 ▼0.05113.33 ▲12.7051.70 ▲6.33
FAQ / How To /wp-admin/admin.php?page=wpa-aws-faq-how-to1,1842.0226.6434.70
WPAdmin CDN /wp-admin/admin.php?page=wpa-aws-setup1,1092.1823.3338.63
Support Us /wp-admin/admin.php?page=wpa-aws-donate8192.0622.7731.35
SSL Manager /wp-admin/admin.php?page=wpa-aws-ssl8772.0424.7532.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+56
    Constant DB_NAME already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+59
    Constant DB_USER already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+62
    Constant DB_PASSWORD already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+65
    Constant DB_HOST already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+68
    Constant DB_CHARSET already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+71
    Constant DB_COLLATE already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+84
    Constant AUTH_KEY already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+85
    Constant SECURE_AUTH_KEY already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+86
    Constant LOGGED_IN_KEY already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+87
    Constant NONCE_KEY already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+88
    Constant AUTH_SALT already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+89
    Constant SECURE_AUTH_SALT already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+90
    Constant LOGGED_IN_SALT already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+91
    Constant NONCE_SALT already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-config.php+115
    Constant WP_DEBUG already defined
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-deploy.php+103
    Undefined variable: cpselected1
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-deploy.php+104
    Undefined variable: cpselected2
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-deploy.php+105
    Undefined variable: cpselected3
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-deploy.php+113
    Undefined variable: tlsselected1
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-deploy.php+115
    Undefined variable: tlsselected3
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-deploy.php+116
    Undefined variable: tlsselected4
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-deploy.php+125
    Undefined variable: coselected1
    • > GET request to /wp-admin/admin.php?page=wpa-aws-setup
    • > Notice in wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-deploy.php+126
    Undefined variable: coselected2

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
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/aws-cdn-by-wpadmin/admin/wpa-aws-registration.php
    • > /wp-content/plugins/aws-cdn-by-wpadmin/includes/class-aws-cdn.php
  • 816× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/MainframeModernization/MainframeModernizationClient.php:73
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/Glacier/Exception/GlacierException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/RedshiftServerless/Exception/RedshiftServerlessException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/MachineLearning/Exception/MachineLearningException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/WorkSpaces/Exception/WorkSpacesException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\MonitoringEventsInterface' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/Endpoint/UseDualstackEndpoint/Exception/ConfigurationException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/ComputeOptimizer/ComputeOptimizerClient.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/SageMakerRuntime/Exception/SageMakerRuntimeException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\DefaultsMode\\ConfigurationInterface' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/DefaultsMode/Configuration.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/aws-cdn-by-wpadmin/admin/aws/Aws/Pinpoint/Exception/PinpointException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
6 plugin tags: aws, cdn, amazon, cloudfront, multisite...

aws-cdn-by-wpadmin/aws-cdn-by-wpadmin.php 92% from 13 tests

The main PHP file in "WPAdmin AWS CDN" ver. 3.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 248 characters long)

Code Analysis 97% from 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 plugin60,381 lines of code in 1,882 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,8767,84143,70951,935
Markdown43,04908,322
JavaScript101123
CSS1001

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity5.57
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces667
Interfaces48
Traits25
Classes925
▷ Abstract classes131.41%
▷ Concrete classes91298.59%
▷ Final classes262.85%
Methods2,537
▷ Static methods45217.82%
▷ Public methods1,76969.73%
▷ Protected methods1325.20%
▷ Private methods63625.07%
Functions456
▷ Named functions8117.76%
▷ Anonymous functions37582.24%
Constants311
▷ Global constants4414.15%
▷ Class constants26785.85%
▷ Public constants267100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.37MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png134.31KB43.25KB▼ 67.80%
screenshot-1.png60.99KB23.66KB▼ 61.21%
screenshot-5.png70.02KB35.34KB▼ 49.53%
screenshot-2.png45.67KB13.22KB▼ 71.06%
screenshot-4.png68.15KB34.12KB▼ 49.94%