84% arvancloud-cdn

Code Review | ArvanCloud CDN

WordPress plugin ArvanCloud CDN scored84%from 54 tests.

About plugin

  • Plugin page: arvancloud-cdn
  • Plugin version: 0.9.10
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2022
  • Latest release: Sep 25, 2023
  • Number of updates: 23
  • Update frequency: every 25.5 days
  • Top authors: khorshidlab (95.65%)arvancloud (8.7%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,002 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.14MB] [CPU: ▼12.78ms] Passed 4 tests

A check of server-side resources used by ArvanCloud CDN
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5743.45 ▲2.10
Dashboard /wp-admin3.87 ▲0.5656.80 ▲4.20
Posts /wp-admin/edit.php3.92 ▲0.5652.24 ▲3.01
Add New Post /wp-admin/post-new.php3.65 ▼2.2439.45 ▼60.41
Media Library /wp-admin/upload.php3.79 ▲0.5645.76 ▲8.32
About /wp-admin/admin.php?page=arvancloud-cdn-about4.17385.43
CDN General Settings /wp-admin/admin.php?page=arvancloud-cdn4.17411.59

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for ArvanCloud CDN
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.33 ▼1.322.37 ▲0.6148.14 ▲3.27
Dashboard /wp-admin2,234 ▲464.88 ▼0.98114.92 ▼4.3178.16 ▲35.02
Posts /wp-admin/edit.php2,135 ▲462.00 ▼0.0137.62 ▲0.2736.42 ▼1.87
Add New Post /wp-admin/post-new.php1,549 ▲1323.27 ▲0.03687.83 ▼6.9460.61 ▼0.96
Media Library /wp-admin/upload.php1,425 ▲404.29 ▲0.07101.35 ▼13.4575.28 ▲28.60
About /wp-admin/admin.php?page=arvancloud-cdn-about8712.4933.8025.64
CDN General Settings /wp-admin/admin.php?page=arvancloud-cdn9642.4231.2447.40

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Arvan\\Security\\HTTPS_Settings' not found in wp-content/plugins/arvancloud-cdn/admin/views/security/https_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Arvan\\Security\\Firewall' not found in wp-content/plugins/arvancloud-cdn/admin/views/security/firewall_settings.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Arvan\\CDN\\Cache\\Caching_Settings' not found in wp-content/plugins/arvancloud-cdn/admin/views/cache/caching_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Arvan\\Security\\DDoS_Protection' not found in wp-content/plugins/arvancloud-cdn/admin/views/security/ddos_protection.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/arvancloud-cdn/admin/views/options-display.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/arvancloud-cdn/admin/views/components/header.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/arvancloud-cdn/admin/views/reports/reports_status.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Arvan\\Helper' not found in wp-content/plugins/arvancloud-cdn/admin/views/components/footer.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/arvancloud-cdn/admin/views/about-us-display.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Arvan\\CDN\\Acceleration' not found in wp-content/plugins/arvancloud-cdn/admin/views/acceleration.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
2 plugin tags: cdn, arvancloud

arvancloud-cdn/wp-arvancloud-cdn.php 85% from 13 tests

The entry point to "ArvanCloud CDN" version 0.9.10 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("arvancloud-cdn.php" instead of "wp-arvancloud-cdn.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 234 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected5,711 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP337818842,935
CSS420091,350
JavaScript619452871
PO File1190294546
SVG9009

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.67
▷ Minimum class complexity3.00
▷ Maximum class complexity43.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods127
▷ Static methods8365.35%
▷ Public methods9474.02%
▷ Protected methods00.00%
▷ Private methods3325.98%
Functions23
▷ Named functions00.00%
▷ Anonymous functions23100.00%
Constants10
▷ Global constants990.00%
▷ Class constants110.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin