78% design-import-export

Code Review | FSE Theme Design Import/Export - Templates, Template Parts and Global Styles

WordPress plugin FSE Theme Design Import/Export - Templates, Template Parts and Global Styles scored78%from 54 tests.

About plugin

  • Plugin page: design-import-export
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2021
  • Latest release: Mar 30, 2023
  • Number of updates: 7
  • Update frequency: every 89.1 days
  • Top authors: uxl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,758 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by FSE Theme Design Import/Export - Templates, Template Parts and Global Styles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.10 ▼0.61
Dashboard /wp-admin3.31 ▲0.0144.63 ▼6.80
Posts /wp-admin/edit.php3.36 ▲0.0140.52 ▼6.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.02 ▼0.43
Media Library /wp-admin/upload.php3.23 ▲0.0134.52 ▲1.84

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for FSE Theme Design Import/Export - Templates, Template Parts and Global Styles
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.26 ▼1.364.60 ▲2.8946.92 ▼0.39
Dashboard /wp-admin2,215 ▲274.86 ▼1.04101.91 ▼12.1442.96 ▼0.55
Posts /wp-admin/edit.php2,098 ▲92.05 ▼0.1238.26 ▲3.2733.94 ▼1.94
Add New Post /wp-admin/post-new.php1,552 ▲1618.22 ▼5.20610.58 ▼59.1551.03 ▼12.66
Media Library /wp-admin/upload.php1,403 ▲154.21 ▼0.01100.11 ▼7.4044.68 ▼2.83

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/design-import-export/design-import.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/design-import-export/includes/exporter.php:114

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: global styles, templates, blocks, export, import...

design-import-export/design-import.php 77% from 13 tests

Analyzing the main PHP file in "FSE Theme Design Import/Export - Templates, Template Parts and Global Styles" version 1.1.1
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("design-import-export.php" instead of "design-import.php")
  • Plugin Name: Please don't use more than 70 characters for the plugin name (currently 76 characters long)

Code Analysis Passed 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 detected615 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP310080520
CSS116075
JavaScript10020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin