72% export-2-multisite

Code Review | Export 2 Multisite

WordPress plugin Export 2 Multisite scored 72% from 53 tests.

About plugin

  • Plugin page: export-2-multisite
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 5.8.1
  • First release: Oct 29, 2014
  • Latest release: Nov 5, 2014
  • Number of updates: 8
  • Update frequency: every 1.8 days
  • Top authors: jamiechong (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 1,216 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼278.32ms] Passed 4 tests

Server-side resources used by Export 2 Multisite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.30 ▲13.89
Dashboard /wp-admin3.57 ▲0.5244.62 ▲3.44
Posts /wp-admin/edit.php3.62 ▲0.5145.37 ▲0.55
Add New Post /wp-admin/post-new.php5.87 ▲0.4497.55 ▼1,112.67
Media Library /wp-admin/upload.php3.45 ▲0.4535.46 ▼4.58
Export 2 Multisite /wp-admin/tools.php?page=e2wpms3.4040.45

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 1 new option
New WordPress options
e2wpms_settings

Browser metrics Passed 4 tests

A check of browser resources used by Export 2 Multisite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲10116.19 ▲0.507.59 ▲0.0251.10 ▲1.73
Dashboard /wp-admin3,003 ▲1505.97 ▲0.14133.35 ▲1.11110.62 ▲5.13
Posts /wp-admin/edit.php2,711 ▲52.70 ▲0.0165.26 ▼2.3191.58 ▲0.84
Add New Post /wp-admin/post-new.php1,656 ▼20118.81 ▼0.40368.01 ▲8.09105.66 ▼2.46
Media Library /wp-admin/upload.php1,780 ▲84.99 ▼0.02142.51 ▼2.47111.82 ▼3.78
Export 2 Multisite /wp-admin/tools.php?page=e2wpms2,0203.3069.49111.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • e2wpms_settings

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=e2wpms
    • > Notice in wp-content/plugins/export-2-multisite/class/e2wpms.php+977
    Undefined index: table_name
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=e2wpms
    • > Notice in wp-content/plugins/export-2-multisite/class/e2wpms.php+1015
    A non well formed numeric value encountered
    • > GET request to /wp-admin/tools.php?page=e2wpms
    • > Notice in wp-content/plugins/export-2-multisite/template/migrate.php+120
    Undefined index: export-2-multisite
    • > GET request to /wp-admin/tools.php?page=e2wpms
    • > Notice in wp-content/plugins/export-2-multisite/template/migrate.php+120
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/export-2-multisite/template/help.php
    • > /wp-content/plugins/export-2-multisite/template/addons.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/export-2-multisite/template/common/compatibility.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/export-2-multisite/template/migrate-progress.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/export-2-multisite/template/e2wpms/exclude-post-revisions.php on line 3
    • > PHP Notice
      Undefined variable: loaded_profile in wp-content/plugins/export-2-multisite/template/e2wpms/exclude-post-revisions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/export-2-multisite/export-2-multisite.php:54
    • > PHP Fatal error
      Uncaught Error: Class 'E2WPMS_Base' not found in wp-content/plugins/export-2-multisite/class/e2wpms.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/export-2-multisite/template/e2wpms/wordpress-org-support.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/export-2-multisite/template/common/debug-info.php:2
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/export-2-multisite/template/e2wpms/exclude-post-revisions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/export-2-multisite/template/e2wpms/exclude-post-revisions.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: export, migrate, database, multisite, mysql

export-2-multisite/export-2-multisite.php Passed 13 tests

The main PHP script in "Export 2 Multisite" version 0.2 is automatically included on every request by WordPress
97 characters long description:
Exports your database as a MySQL data dump that can be imported into a WP Multisite installation.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected6,314 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP175712412,626
JavaScript4317562,103
CSS111261,585

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity142.33
▷ Minimum class complexity7.00
▷ Maximum class complexity338.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods106
▷ Static methods10.94%
▷ Public methods106100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected