78% wp-clone-by-wp-academy

Code Review | Clone

WordPress plugin Clone scored78%from 54 tests.

About plugin

  • Plugin page: wp-clone-by-wp-ac...
  • Plugin version: 2.4.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: Dec 20, 2012
  • Latest release: Oct 20, 2023
  • Number of updates: 95
  • Update frequency: every 41.6 days
  • Top authors: wpacademy (52.63%)nick843 (23.16%)iclyde (15.79%)migrate (9.47%)backupsupport (3.16%)

Code review

54 tests

User reviews

340 reviews

Install metrics

100,000+ active /3,104,506 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
Install script ran successfully

Server metrics [RAM: ▲0.83MB] [CPU: ▲5.45ms] Passed 4 tests

An overview of server-side resources used by Clone
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.34 ▲0.8852.42 ▲15.10
Dashboard /wp-admin4.16 ▲0.8655.83 ▲6.72
Posts /wp-admin/edit.php4.21 ▲0.8554.35 ▲7.06
Add New Post /wp-admin/post-new.php6.69 ▲0.8193.70 ▼4.12
Media Library /wp-admin/upload.php4.02 ▲0.7945.57 ▲12.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 161 new files
Database: no new tables, 12 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
_tifm_force_disable_feature_fix
insPP_timeout
_tifm_feature_enabled
can_compress_scripts
db_upgraded
_tifm_disable_feature_forever
insPP_body_alt_timeout
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Clone
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,077 ▲31614.32 ▼0.301.55 ▼0.0138.88 ▼0.83
Dashboard /wp-admin2,480 ▲3065.66 ▲0.1090.53 ▲5.9580.14 ▲39.41
Posts /wp-admin/edit.php2,406 ▲3062.01 ▼0.0238.10 ▲0.7141.55 ▲7.35
Add New Post /wp-admin/post-new.php1,875 ▲34721.40 ▼1.56644.65 ▼25.4062.12 ▲3.63
Media Library /wp-admin/upload.php1,682 ▲2824.19 ▲0.01100.28 ▼11.3281.16 ▲32.56

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 12 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • _tifm_disable_feature_forever
    • insPP_timeout
    • widget_theysaidso_widget
    • analyst_cache
    • theysaidso_admin_options
    • insPP_body_alt_timeout
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-clone-by-wp-academy/analyst/templates/forms/deactivate.php
    • > /wp-content/plugins/wp-clone-by-wp-academy/analyst/templates/optout.php
    • > /wp-content/plugins/wp-clone-by-wp-academy/analyst/templates/forms/install.php
    • > /wp-content/plugins/wp-clone-by-wp-academy/analyst/templates/optin.php
  • 23× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\CacheContract' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Cache/DatabaseCache.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\AnalystContract' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Analyst.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Http/Requests/ActivateRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Http/Requests/OptInRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\HttpClientContract' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Http/CurlHttpClient.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Http/Requests/OptOutRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Http/Requests/UninstallRequest.php:14
    • > PHP Notice
      Undefined variable: shieldImage in wp-content/plugins/wp-clone-by-wp-academy/analyst/templates/optout.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Http/Requests/InstallRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Core\\AbstractFactory' not found in wp-content/plugins/wp-clone-by-wp-academy/analyst/src/Account/AccountDataFactory.php:15

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 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Configuration Page)
The official readme.txt is a good inspiration

wp-clone-by-wp-academy/wpclone.php 85% from 13 tests

The main PHP file in "Clone" ver. 2.4.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-clone-by-wp-academy.php" instead of "wpclone.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6,328 lines of code in 121 files:
LanguageFilesBlank linesComment linesLines of code
PHP711,6161,7695,215
CSS58821506
JavaScript59611394
SVG4002213

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.81
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces6
Traits0
Classes26
▷ Abstract classes27.69%
▷ Concrete classes2492.31%
▷ Final classes00.00%
Methods234
▷ Static methods239.83%
▷ Public methods18679.49%
▷ Protected methods104.27%
▷ Private methods3816.24%
Functions92
▷ Named functions7682.61%
▷ Anonymous functions1617.39%
Constants28
▷ Global constants2589.29%
▷ Class constants310.71%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
32 compressed PNG files occupy 0.47MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/banner/views/projects/fit/imgs/big-colored-logo.png1.20KB1.18KB▼ 1.95%
modules/banner/views/projects/mpu/imgs/background-images.png29.75KB29.59KB▼ 0.54%
modules/banner/views/projects/mpu/imgs/background-texture-grey.png5.22KB5.46KB0.00%
modules/banner/views/projects/usm/imgs/big-colored-logo.png10.69KB10.50KB▼ 1.71%
modules/banner/views/projects/fit/imgs/face2.png1.55KB1.52KB▼ 1.70%