64% cmc-migrate

Code Review | CMC MIGRATE

WordPress plugin CMC MIGRATE scored 64% from 54 tests.

About plugin

  • Plugin page: cmc-migrate
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-4.8
  • WordPress version: 6.3.1
  • First release: May 19, 2017
  • Latest release: Jul 18, 2017
  • Number of updates: 12
  • Update frequency: every 5.7 days
  • Top authors: lovnic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 875 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.71ms] Passed 4 tests

This is a short check of server-side resources used by CMC MIGRATE
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.73 ▼1.93
Dashboard /wp-admin3.32 ▲0.0246.86 ▲1.69
Posts /wp-admin/edit.php3.37 ▲0.0147.32 ▼0.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.21 ▼9.46
Media Library /wp-admin/upload.php3.24 ▲0.0136.16 ▲1.09
CMC Migrate /wp-admin/tools.php?page=cmcmg3.2930.34

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

A short overview of filesystem and database impact
Just a few items left to fix
  • You have illegally modified 1 file (0.01KB) outside of "wp-content/plugins/cmc-migrate/" and "wp-content/uploads/"
    • (new file) wp-content/cmc-migrate/export/.htaccess
Filesystem: 71 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
cmc_migrate_settings
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for CMC MIGRATE
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.65 ▼0.714.45 ▲2.6441.93 ▼4.53
Dashboard /wp-admin2,210 ▲224.90 ▼0.96107.67 ▼3.4239.36 ▼20.36
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0540.44 ▲0.1134.95 ▼1.36
Add New Post /wp-admin/post-new.php1,540 ▼223.37 ▲5.12654.61 ▲54.7753.02 ▼9.62
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0896.80 ▼1.4844.92 ▼2.46
CMC Migrate /wp-admin/tools.php?page=cmcmg1,1181.9126.9629.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Error in wp-content/plugins/cmc-migrate/uninstall.php+30
    Uncaught Error: Call to undefined method cmc_migrate::get_setting() in wp-content/plugins/cmc-migrate/uninstall.php:30
    Stack trace:
    #0 wp-admin/includes/plugin.php(1245): include_once()
    #1 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 71 files (1.54MB) in the plugin directory
    • (new file) assets/css/font-awesome/fonts/FontAwesome.otf
    • (new file) assets/css/font-awesome/fonts/fontawesome-webfont.eot
    • (new file) assets/css/font-awesome/fonts/fontawesome-webfont.svg
    • (new file) assets/css/font-awesome/css/font-awesome.min.css
    • (new file) assets/css/font-awesome/css/font-awesome.css
    • (new file) assets/css/font-awesome/less/animated.less
    • (new file) assets/css/font-awesome/fonts/fontawesome-webfont.ttf
    • (new file) assets/css/font-awesome/HELP-US-OUT.txt
    • (new file) assets/css/font-awesome/fonts/fontawesome-webfont.woff
    • (new file) assets/css/font-awesome/fonts/fontawesome-webfont.woff2
    • ...
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • cmc_migrate_settings

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=cmcmg
    • > Notice in wp-content/plugins/cmc-migrate/page/admin.php+139
    Undefined index: active
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=cmcmg
    • > Notice in wp-content/plugins/cmc-migrate/page/admin.php+140
    Undefined index: class
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=cmcmg
    • > Notice in wp-content/plugins/cmc-migrate/page/admin.php+141
    Undefined index: atts
    • > GET request to /wp-admin/tools.php?page=cmcmg
    • > Notice in wp-content/plugins/cmc-migrate/page/admin.php+147
    Undefined index: section
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=cmcmg
    • > Notice in wp-content/plugins/cmc-migrate/include/class-cmc-migration-table.php+174
    Undefined index: location
    • > GET request to /wp-admin/tools.php?page=cmcmg
    • > Notice in wp-content/plugins/cmc-migrate/include/class-cmc-migration-table.php+61
    Undefined offset: 0

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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: singlesite, export, multisite, migration

cmc-migrate/cmc-migrate.php 92% from 13 tests

The entry point to "CMC MIGRATE" version 0.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin13,368 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
CSS91031394,870
SVG1002,671
PHP172806432,144
Sass1434341,768
LESS1434441,758
JavaScript21441157

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity41.57
▷ Minimum class complexity18.00
▷ Maximum class complexity63.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods82
▷ Static methods6579.27%
▷ Public methods6376.83%
▷ Protected methods56.10%
▷ Private methods1417.07%
Functions14
▷ Named functions17.14%
▷ Anonymous functions1392.86%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
assets/css/jquery-ui/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
assets/css/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/css/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%