10% wp-clone-template

Code Review | Export Themes

WordPress plugin Export Themes scored 10% from 54 tests.

About plugin

  • Plugin page: wp-clone-template
  • Plugin version: 2.12
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 5.8.1
  • First release: Apr 26, 2011
  • Latest release: Apr 10, 2020
  • Number of updates: 18
  • Update frequency: every 181.8 days
  • Top authors: milardovich (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active / 105,800 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-clone-template/main.php+10
    define(): Declaration of case-insensitive constants is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼189.17ms] Passed 4 tests

Analyzing server-side resources used by Export Themes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼1.045.05 ▼23.40
Dashboard /wp-admin1.81 ▼1.256.33 ▼40.28
Posts /wp-admin/edit.php1.81 ▼1.305.25 ▼38.65
Add New Post /wp-admin/post-new.php1.81 ▼3.625.41 ▼648.89
Media Library /wp-admin/upload.php1.81 ▼1.196.09 ▼28.84
Export /wp-admin/themes.php?page=clone_template1.814.71

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Export Themes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.01 ▼0.0710.56 ▼1.1050.30 ▲1.40
Dashboard /wp-admin2,975 ▲385.93 ▼0.09146.07 ▼2.73110.79 ▲0.22
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0165.05 ▼1.1087.19 ▼7.96
Add New Post /wp-admin/post-new.php1,675 ▼818.82 ▲0.03388.72 ▼18.54104.38 ▼3.87
Media Library /wp-admin/upload.php1,812 ▲25.04 ▲0.00167.15 ▲17.26113.81 ▼7.14
Export /wp-admin/themes.php?page=clone_template1,0572.0955.7076.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-clone-template/main.php+10
    define(): Declaration of case-insensitive constants is deprecated

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=clone_template
    • > Deprecated in wp-content/plugins/wp-clone-template/main.php+10
    define(): Declaration of case-insensitive constants is deprecated
    • > GET request to /wp-admin/themes.php?page=clone_template
    • > Notice in wp-content/plugins/wp-clone-template/main.php+107
    Undefined index: wpct_buffer

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpct_get_templates_options() in wp-content/plugins/wp-clone-template/views/export.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-clone-template/main.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 ("Export" option in the apparience menu.), #2 (Wp-clone-template running.), #3 (Just another screenshot.)
You can look at the official readme.txt

wp-clone-template/main.php 92% from 13 tests

"Export Themes" version 2.12's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-clone-template.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected3,064 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39301,8373,064

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity553.00
▷ Minimum class complexity553.00
▷ Maximum class complexity553.00
Average method complexity12.04
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants63
▷ Global constants63100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png8.74KB4.01KB▼ 54.11%
screenshot-3.png81.45KB32.22KB▼ 60.44%
screenshot-1.png13.23KB5.75KB▼ 56.50%
thumb.png81.45KB32.22KB▼ 60.44%