88% flywheel-migrations

Code Review | Flywheel Migrations

WordPress plugin Flywheel Migrations scored 88% from 54 tests.

About plugin

  • Plugin page: flywheel-migrations
  • Plugin version: 4.62
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Apr 15, 2020
  • Latest release: Nov 6, 2021
  • Number of updates: 20
  • Update frequency: every 28.6 days
  • Top authors: ritesh.soni36 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active / 39,708 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼140.36ms] Passed 4 tests

Analyzing server-side resources used by Flywheel Migrations
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2238.56 ▲16.09
Dashboard /wp-admin3.27 ▲0.2148.35 ▲10.14
Posts /wp-admin/edit.php3.32 ▲0.2148.22 ▲6.62
Add New Post /wp-admin/post-new.php5.56 ▲0.1390.31 ▼582.77
Media Library /wp-admin/upload.php3.15 ▲0.1538.69 ▲4.59

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Flywheel Migrations: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲10115.83 ▲0.279.71 ▲0.8347.44 ▼3.98
Dashboard /wp-admin2,982 ▲485.92 ▼0.04136.22 ▼17.53139.27 ▲21.72
Posts /wp-admin/edit.php2,773 ▲342.70 ▼0.0166.43 ▼0.6893.43 ▲7.17
Add New Post /wp-admin/post-new.php1,617 ▼6618.55 ▼0.23378.34 ▼11.14110.39 ▲5.56
Media Library /wp-admin/upload.php1,767 ▼405.03 ▲0.02144.45 ▼27.62145.65 ▲35.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/flywheel-migrations/admin/main_page.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/flywheel-migrations/admin/main_page.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: migration, flywheel

flywheel-migrations/flywheel.php 92% from 13 tests

The primary PHP file in "Flywheel Migrations" version 4.62 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("flywheel-migrations.php" instead of "flywheel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,772 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP22319372,712
CSS10060

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.27
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods202
▷ Static methods3215.84%
▷ Public methods20199.50%
▷ Protected methods00.00%
▷ Private methods10.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png0.91KB1.13KB0.00%