84% electric-migration

Code Review | Electric Migration

WordPress plugin Electric Migration scored84%from 54 tests.

About plugin

  • Plugin page: electric-migration
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: May 17, 2019
  • Latest release: Aug 15, 2022
  • Number of updates: 11
  • Update frequency: every 107.9 days
  • Top authors: electriccode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /996 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.20ms] Passed 4 tests

Analyzing server-side resources used by Electric Migration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.15 ▼1.79
Dashboard /wp-admin3.36 ▲0.0149.59 ▼14.11
Posts /wp-admin/edit.php3.41 ▲0.0555.10 ▲5.73
Add New Post /wp-admin/post-new.php5.94 ▲0.05103.53 ▲8.59
Media Library /wp-admin/upload.php3.28 ▲0.0538.19 ▲1.39
Electric Migration /wp-admin/tools.php?page=electric-migrate3.2530.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Electric Migration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8314.69 ▼0.101.79 ▼0.0942.69 ▼2.57
Dashboard /wp-admin2,193 ▲135.64 ▼0.0094.17 ▲2.2246.53 ▲3.50
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0239.75 ▲1.6434.74 ▼3.78
Add New Post /wp-admin/post-new.php1,529 ▼623.48 ▲5.22677.68 ▲6.2658.12 ▼22.88
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.04111.45 ▼31.4248.14 ▼3.44
Electric Migration /wp-admin/tools.php?page=electric-migrate8151.6926.2527.97

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

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)
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/electric-migration/electric-migration.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: contact form, shortcodes, electric, enquiries

electric-migration/electric-migration.php 92% from 13 tests

The main file in "Electric Migration" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)

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
No dangerous file extensions were detected259 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111676259

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants2
▷ Global constants2100.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