94% wp-theme-exporter

Code Review | WP Theme Exporter

WordPress plugin WP Theme Exporter scored 94% from 53 tests.

About plugin

  • Plugin page: wp-theme-exporter
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 5.8.1
  • First release: Sep 30, 2017
  • Latest release: Jan 24, 2018
  • Number of updates: 7
  • Update frequency: every 16.7 days
  • Top authors: wedesignwebuild (100%)

Code review

53 tests

User reviews

3 reviews

Install metrics

400+ active / 4,739 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼257.22ms] Passed 4 tests

Server-side resources used by WP Theme Exporter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.97 ▲0.2535.37 ▲13.74
Dashboard /wp-admin3.20 ▲0.1549.10 ▲2.29
Posts /wp-admin/edit.php3.31 ▲0.2044.98 ▲0.56
Add New Post /wp-admin/post-new.php5.56 ▲0.1393.78 ▼1,030.67
Media Library /wp-admin/upload.php3.14 ▲0.1434.69 ▼1.06
WP Theme Exporter /wp-admin/tools.php?page=wp-theme-exporter3.2134.48

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Theme Exporter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲9715.85 ▲0.299.27 ▼1.2042.38 ▼10.49
Dashboard /wp-admin2,932 ▲825.94 ▲0.15138.45 ▲3.5297.35 ▼5.30
Posts /wp-admin/edit.php2,711 ▲82.69 ▲0.0171.51 ▲1.2492.36 ▲4.20
Add New Post /wp-admin/post-new.php1,659 ▼018.39 ▼0.47357.46 ▼21.45111.87 ▲0.10
Media Library /wp-admin/upload.php1,777 ▲54.99 ▼0.01165.03 ▼0.06119.58 ▼5.15
WP Theme Exporter /wp-admin/tools.php?page=wp-theme-exporter1,2582.5969.2690.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-theme-exporter/templates/plugin-page.php:8
    • > PHP Fatal error
      Trait 'WPThemeExporter\\Field\\ControlVars' not found in wp-content/plugins/wp-theme-exporter/includes/Field/Control.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-theme-exporter/wp-theme-exporter.php:21
    • > PHP Fatal error
      Trait 'WPThemeExporter\\Field\\ControlVars' not found in wp-content/plugins/wp-theme-exporter/includes/Admin/Field.php on line 16

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

wp-theme-exporter/wp-theme-exporter.php Passed 13 tests

The main PHP script in "WP Theme Exporter" version 1.2 is automatically included on every request by WordPress
77 characters long description:
WP Theme Exporter is a amazing tool helps you export theme and plugin easily.

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
Good job! No executable or dangerous file extensions detected6,646 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35309002,621
CSS7142951,855
Sass49401,157
PHP163233851,012
JSON1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.78
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces4
Interfaces0
Traits1
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods55
▷ Static methods35.45%
▷ Public methods4683.64%
▷ Protected methods00.00%
▷ Private methods916.36%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin