83% cpi-wp-migration

Code Review | WP移行専用プラグイン for CPI

WordPress plugin WP移行専用プラグイン for CPI scored83%from 54 tests.

About plugin

  • Plugin page: cpi-wp-migration
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 5, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 28
  • Update frequency: every 46.2 days
  • Top authors: kddiwebcommunications (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /3,717 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼3.16ms] Passed 4 tests

An overview of server-side resources used by WP移行専用プラグイン for CPI
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1834.34 ▼5.36
Dashboard /wp-admin3.51 ▲0.2044.76 ▼5.53
Posts /wp-admin/edit.php3.56 ▲0.2049.32 ▲1.36
Add New Post /wp-admin/post-new.php6.11 ▲0.2285.21 ▼1.33
Media Library /wp-admin/upload.php3.43 ▲0.2036.43 ▼0.41
Export /wp-admin/admin.php?page=cpiwm_export3.4632.04
Backups /wp-admin/admin.php?page=cpiwm_backups3.4733.39
Import /wp-admin/admin.php?page=cpiwm_import3.4627.91

Server storage [IO: ▲1.01MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • You have illegally modified 3 files (0.49KB) outside of "wp-content/plugins/cpi-wp-migration/" and "wp-content/uploads/"
    • (new file) wp-content/cpiwm-backups/.htaccess
    • (new file) wp-content/cpiwm-backups/index.php
    • (new file) wp-content/cpiwm-backups/web.config
Filesystem: 164 new files
Database: no new tables, 7 new options
New WordPress options
cpiwm_secret_key
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP移行専用プラグイン for CPI
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10913.22 ▼1.232.13 ▲0.4140.49 ▼1.59
Dashboard /wp-admin2,233 ▲455.88 ▲0.97109.54 ▼8.4441.81 ▼1.30
Posts /wp-admin/edit.php2,122 ▲331.99 ▲0.0334.45 ▼2.0131.83 ▼1.07
Add New Post /wp-admin/post-new.php1,538 ▼417.74 ▼0.51665.78 ▲25.8351.74 ▼0.97
Media Library /wp-admin/upload.php1,421 ▲334.22 ▼0.0799.98 ▼0.9647.81 ▲1.94
Export /wp-admin/admin.php?page=cpiwm_export1,0041.9127.3146.53
Backups /wp-admin/admin.php?page=cpiwm_backups8941.7229.2227.89
Import /wp-admin/admin.php?page=cpiwm_import8731.7122.6040.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • cpiwm_updater
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 135× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/cpi-wp-migration/lib/view/updater/modal.php
    • > /wp-content/plugins/cpi-wp-migration/lib/model/import/class-cpiwm-import-enumerate.php
    • > /wp-content/plugins/cpi-wp-migration/lib/view/export/button-webdav.php
    • > /wp-content/plugins/cpi-wp-migration/lib/view/export/export-buttons.php
    • > /wp-content/plugins/cpi-wp-migration/lib/model/class-cpiwm-backups.php
    • > /wp-content/plugins/cpi-wp-migration/lib/view/export/export-permissions.php
    • > /wp-content/plugins/cpi-wp-migration/lib/model/class-cpiwm-template.php
    • > /wp-content/plugins/cpi-wp-migration/lib/model/class-cpiwm-extensions.php
    • > /wp-content/plugins/cpi-wp-migration/lib/vendor/servmask/archiver/class-cpiwm-archiver.php
    • > /wp-content/plugins/cpi-wp-migration/lib/vendor/servmask/iterator/class-cpiwm-recursive-iterator-iterator.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: migration

cpi-wp-migration/cpi-wp-migration.php 85% from 13 tests

The main PHP file in "WP移行専用プラグイン for CPI" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Please keep the plugin description shorter than 140 characters (currently 220 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin11,424 lines of code in 138 files:
LanguageFilesBlank linesComment linesLines of code
PHP1202,3136,4318,023
JavaScript61,0191,4203,180
SVG251211
CSS100010

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 122)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity122.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes88
▷ Abstract classes22.27%
▷ Concrete classes8697.73%
▷ Final classes00.00%
Methods290
▷ Static methods11037.93%
▷ Public methods24183.10%
▷ Protected methods4314.83%
▷ Private methods62.07%
Functions84
▷ Named functions84100.00%
▷ Anonymous functions00.00%
Constants208
▷ Global constants208100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/view/assets/img/logo-20x20.png1.57KB0.86KB▼ 44.86%
lib/view/assets/img/logo-32x32.png2.00KB1.48KB▼ 25.93%
lib/view/assets/img/logo-128x128.png5.90KB2.94KB▼ 50.10%