10% agile-cdn

Code Review | AgileCDN

WordPress plugin AgileCDN scored 10% from 54 tests.

About plugin

  • Plugin page: agile-cdn
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 12, 2022
  • Latest release: Mar 17, 2023
  • Number of updates: 9
  • Update frequency: every 34.3 days
  • Top authors: agilewing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 415 total downloads


Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/agile-cdn/config.php+61
    preg_replace(): Unknown modifier '('

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.71ms] Passed 4 tests

A check of server-side resources used by AgileCDN
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0536.77 ▲0.83
Dashboard /wp-admin3.35 ▲0.0547.65 ▲2.26
Posts /wp-admin/edit.php3.41 ▲0.0549.26 ▼0.45
Add New Post /wp-admin/post-new.php5.95 ▲0.0780.62 ▼17.49
Media Library /wp-admin/upload.php3.28 ▲0.0535.98 ▲3.97

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AgileCDN
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.75 ▼0.631.63 ▲0.0040.59 ▼1.83
Dashboard /wp-admin2,239 ▲485.01 ▲0.12105.81 ▼10.4140.64 ▲2.57
Posts /wp-admin/edit.php2,119 ▲272.24 ▲0.2336.32 ▼5.4932.77 ▼2.64
Add New Post /wp-admin/post-new.php1,533 ▲1923.22 ▲5.52639.80 ▼10.7657.86 ▲5.89
Media Library /wp-admin/upload.php1,424 ▲334.32 ▲0.1498.23 ▼1.4142.65 ▼1.54

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/agile-cdn/config.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function agile_cdn_is_enabled() in wp-content/plugins/agile-cdn/inc/agile_cdn_rewrite.class.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/agile-cdn/agilecdn-wordpress-extend.php:12

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

agile-cdn/agilecdn-wordpress-extend.php 92% from 13 tests

This is the main PHP file of "AgileCDN" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("agile-cdn.php" instead of "agilecdn-wordpress-extend.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin618 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
▷ Named functions787.50%
▷ Anonymous functions112.50%
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo-light.png3.37KB1.98KB▼ 41.25%
img/info.png8.28KB3.46KB▼ 58.21%
img/error.png5.59KB1.84KB▼ 67.01%
img/right.png6.51KB2.73KB▼ 58.11%
img/question.png0.37KB0.31KB▼ 15.79%