84% flying-scripts

Code Review | Flying Scripts

WordPress plugin Flying Scripts scored84%from 54 tests.

About plugin

  • Plugin page: flying-scripts
  • Plugin version: 1.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 51
  • Update frequency: every 25.1 days
  • Top authors: gijo (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

30,000+ active /173,829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼8.57ms] Passed 4 tests

Server-side resources used by Flying Scripts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2742.01 ▼2.89
Dashboard /wp-admin3.62 ▲0.2749.97 ▼14.60
Posts /wp-admin/edit.php3.67 ▲0.3152.19 ▲2.94
Add New Post /wp-admin/post-new.php6.14 ▲0.2586.98 ▼15.40
Media Library /wp-admin/upload.php3.48 ▲0.2538.01 ▼1.38
Flying Scripts /wp-admin/options-general.php?page=flying-scripts3.4635.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
flying_scripts_include_list
widget_theysaidso_widget
widget_recent-comments
flying_scripts_disabled_pages
can_compress_scripts
widget_recent-posts
FLYING_SCRIPTS_VERSION
theysaidso_admin_options
flying_scripts_timeout

Browser metrics Passed 4 tests

Flying Scripts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.72 ▲0.561.78 ▲0.0241.14 ▼2.58
Dashboard /wp-admin2,199 ▲225.61 ▲0.0189.54 ▼11.1439.11 ▼5.56
Posts /wp-admin/edit.php2,104 ▲42.13 ▲0.1239.43 ▲0.7436.02 ▼1.46
Add New Post /wp-admin/post-new.php1,531 ▼423.38 ▲4.94675.30 ▲23.0654.12 ▼14.24
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.1499.13 ▼10.4941.44 ▼2.81
Flying Scripts /wp-admin/options-general.php?page=flying-scripts9261.9921.5425.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • flying_scripts_include_list
    • flying_scripts_timeout
    • can_compress_scripts
    • widget_recent-comments
    • FLYING_SCRIPTS_VERSION
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • flying_scripts_disabled_pages
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/flying-scripts/html-rewrite.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flying-scripts/inject-js.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flying-scripts/init-config.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/flying-scripts/settings/index.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/flying-scripts/settings/settings.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Flying Scripts Settings)
You can take inspiration from this readme.txt

flying-scripts/flying-scripts.php Passed 13 tests

Analyzing the main PHP file in "Flying Scripts" version 1.2.3
52 characters long description:
Download and execute JavaScript on user interaction.

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 plugin2,049 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP124133242,027
JavaScript12022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity193.50
▷ Minimum class complexity138.00
▷ Maximum class complexity249.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods7583.33%
▷ Protected methods1516.67%
▷ Private methods00.00%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants23
▷ Global constants23100.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
No PNG files were detected