83% cache-external-scripts

Code Review | Cache External Scripts

WordPress plugin Cache External Scripts scored 83% from 54 tests.

About plugin

  • Plugin page: cache-external-sc...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 5.8.1
  • First release: Nov 24, 2015
  • Latest release: May 11, 2019
  • Number of updates: 11
  • Update frequency: every 114.9 days
  • Top authors: Voorsie (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

3,000+ active / 28,581 total downloads


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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Cache External Scripts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2047.76 ▲19.30
Dashboard /wp-admin3.17 ▲0.111,050.22 ▲1,000.57
Posts /wp-admin/edit.php3.15 ▲0.0445.02 ▼5.47
Add New Post /wp-admin/post-new.php5.46 ▲0.0397.50 ▼563.34
Media Library /wp-admin/upload.php3.04 ▲0.0333.61 ▼6.20
Cache External Scripts /wp-admin/options-general.php?page=cache-external-scripts3.0061.33

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Cache External Scripts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.19 ▲0.5810.39 ▲2.5752.99 ▼2.53
Dashboard /wp-admin2,978 ▲445.91 ▲0.01146.50 ▼4.88122.95 ▼0.21
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0266.50 ▼3.3691.27 ▼2.54
Add New Post /wp-admin/post-new.php1,686 ▲318.80 ▲0.06388.33 ▼25.15113.88 ▼4.40
Media Library /wp-admin/upload.php1,812 ▲55.01 ▼0.00173.02 ▲26.65126.19 ▼0.04
Cache External Scripts /wp-admin/options-general.php?page=cache-external-scripts1,0272.0959.6774.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=cache-external-scripts
    • > Notice in wp-content/plugins/cache-external-scripts/cache-external-scripts.php+126
    Undefined index: action

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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cache-external-scripts/uninstall.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/cache-external-scripts/cache-external-scripts.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: local, google analytics, caching, cache, javascripts...

cache-external-scripts/cache-external-scripts.php Passed 13 tests

The main PHP script in "Cache External Scripts" version 0.4 is automatically included on every request by WordPress
133 characters long description:
This plugin allows you to cache the Google Analytics JavaScript file to be cached for more than 2 hours, for a better PageSpeed score

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
No dangerous file extensions were detected106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions10100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin