84% customizer-export-import

Code Review | Customizer Export/Import

WordPress plugin Customizer Export/Import scored84%from 54 tests.

About plugin

  • Plugin page: customizer-export...
  • Plugin version: 0.9.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2014
  • Latest release: Apr 7, 2023
  • Number of updates: 44
  • Update frequency: every 68.9 days
  • Top authors: justinbusa (56.82%)pross (38.64%)eugenealegiojo (9.09%)

Code review

54 tests

User reviews

102 reviews

Install metrics

200,000+ active /1,993,654 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.39ms] Passed 4 tests

A check of server-side resources used by Customizer Export/Import
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.92 ▼6.31
Dashboard /wp-admin3.31 ▲0.0147.60 ▼12.51
Posts /wp-admin/edit.php3.36 ▲0.0049.16 ▼1.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.77 ▼11.89
Media Library /wp-admin/upload.php3.23 ▲0.0032.96 ▼2.84

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Customizer Export/Import
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.041.77 ▼0.0140.18 ▼2.61
Dashboard /wp-admin2,198 ▲215.64 ▲0.0292.57 ▼3.6144.42 ▼0.08
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0240.92 ▲4.5135.99 ▲0.04
Add New Post /wp-admin/post-new.php1,545 ▲1923.41 ▲5.98608.57 ▼21.9358.73 ▲4.06
Media Library /wp-admin/upload.php1,397 ▼64.25 ▲0.01101.86 ▼2.6147.29 ▲2.89

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/customizer-export-import/classes/class-cei-control.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/customizer-export-import/includes/control.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/customizer-export-import/customizer-export-import.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/customizer-export-import/classes/class-cei-option.php:9

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)
Everything seems fine on the user side


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: import, settings, customizer settings, export, theme settings...

customizer-export-import/customizer-export-import.php Passed 13 tests

Analyzing the main PHP file in "Customizer Export/Import" version 0.9.6
74 characters long description:
Adds settings export and import functionality to the WordPress customizer.

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
There were no executable files found in this plugin372 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.33
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes3100.00%
▷ Static methods1184.62%
▷ Public methods753.85%
▷ Protected methods17.69%
▷ Private methods538.46%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants3100.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
No PNG images were found in this plugin