78% flywheel-migrations

Code Review | Flywheel Migrations

WordPress plugin Flywheel Migrations scored78%from 54 tests.

About plugin

  • Plugin page: flywheel-migrations
  • Plugin version: 5.25
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: Sep 11, 2023
  • Number of updates: 33
  • Update frequency: every 37.8 days
  • Top authors: ritesh.soni36 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active /95,224 total downloads

Benchmarks

Plugin footprint 83% from 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.19MB] [CPU: ▼4.68ms] 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 /3.66 ▲0.2038.95 ▲2.24
Dashboard /wp-admin3.53 ▲0.2347.91 ▼1.05
Posts /wp-admin/edit.php3.58 ▲0.2247.83 ▲0.04
Add New Post /wp-admin/post-new.php6.05 ▲0.1685.52 ▼16.92
Media Library /wp-admin/upload.php3.39 ▲0.1635.72 ▼0.77

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Flywheel Migrations: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.35 ▲0.181.71 ▼0.1437.49 ▼12.19
Dashboard /wp-admin2,213 ▲335.64 ▼0.0379.25 ▼13.4568.68 ▲22.88
Posts /wp-admin/edit.php2,115 ▲182.00 ▲0.0534.52 ▼5.0332.38 ▼2.31
Add New Post /wp-admin/post-new.php1,539 ▲423.63 ▲5.53638.72 ▲30.64151.27 ▲84.06
Media Library /wp-admin/upload.php1,412 ▲124.17 ▼0.1499.93 ▲4.5472.46 ▲32.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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: Call to undefined function esc_url() 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: flywheel, migration

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

The primary PHP file in "Flywheel Migrations" version 5.25 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 plugin3,379 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP23456483,319
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 complexity25.87
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods238
▷ Static methods3213.45%
▷ Public methods23799.58%
▷ Protected methods00.00%
▷ Private methods10.42%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.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%