68% ns-cloner-site-copier

Code Review | NS Cloner - Site Copier

WordPress plugin NS Cloner - Site Copier scored68%from 54 tests.

About plugin

  • Plugin page: ns-cloner-site-co...
  • Plugin version: 4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 7, 2012
  • Latest release: Nov 20, 2023
  • Number of updates: 169
  • Update frequency: every 23.9 days
  • Top authors: neversettle (100%)

Code review

54 tests

User reviews

264 reviews

Install metrics

7,000+ active /639,464 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.01MB] [CPU: ▲2.69ms] Passed 4 tests

This is a short check of server-side resources used by NS Cloner - Site Copier
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.8143.61 ▲1.57
Dashboard /wp-admin4.44 ▲1.0955.38 ▼5.94
Posts /wp-admin/edit.php4.49 ▲1.1357.37 ▲8.44
Add New Post /wp-admin/post-new.php6.96 ▲1.07105.00 ▲6.69
Media Library /wp-admin/upload.php4.30 ▲1.0748.77 ▲12.20
Logs / Status /wp-admin/admin.php?page=ns-cloner-logs4.3241.03
NS Cloner /wp-admin/admin.php?page=ns-cloner4.3448.08

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 192 new files
Database: 1 new table, 6 new options
New tables
wp_ns_cloner_logs
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

NS Cloner - Site Copier: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲6914.70 ▲0.301.54 ▼0.1736.43 ▼5.34
Dashboard /wp-admin2,206 ▲355.57 ▲0.0392.68 ▼6.1181.71 ▲37.97
Posts /wp-admin/edit.php2,129 ▲262.00 ▲0.0539.45 ▼2.3835.77 ▲1.04
Add New Post /wp-admin/post-new.php1,568 ▲4223.29 ▲0.26592.00 ▼87.22135.58 ▲73.21
Media Library /wp-admin/upload.php1,426 ▲264.13 ▼0.0195.99 ▼5.9869.75 ▲28.14
Logs / Status /wp-admin/admin.php?page=ns-cloner-logs1,0361.7830.1090.86
NS Cloner /wp-admin/admin.php?page=ns-cloner1,4262.4037.7783.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_ns_cloner_logs
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=ns-cloner-logs
    • > Warning in wp-content/plugins/ns-cloner-site-copier/class-ns-cloner.php+421
    include_once(wp-content/plugins/ns-cloner-site-copier//templates/ns-template-mcf-header.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=ns-cloner-logs
    • > Warning in wp-content/plugins/ns-cloner-site-copier/class-ns-cloner.php+421
    include_once(): Failed opening 'wp-content/plugins/ns-cloner-site-copier//templates/ns-template-mcf-header.php' for inclusion (include_path='.:/usr/share/php')

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 items
  • 85× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Renderer\\Rich\\Plugin' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Renderer/Rich/DepthLimitPlugin.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Renderer\\Text\\Plugin' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Renderer/Text/ArrayLimitPlugin.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Zval\\Value' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Zval/MethodValue.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Zval\\ResourceValue' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Zval/StreamValue.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Parser\\Plugin' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Parser/ThrowablePlugin.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Zval\\Representation\\Representation' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Zval/Representation/MicrotimeRepresentation.php:30
    • > PHP Fatal error
      require_once(): Failed opening required 'NS_CLONER_V4_PLUGIN_DIRprocesses/class-ns-cloner-export-analytics-process.php' (include_path='.:/usr/share/php') in wp-content/plugins/ns-cloner-site-copier/features/class-ns-cloner-analytics.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Zval\\InstanceValue' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Zval/EnumValue.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Parser\\Plugin' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Parser/StreamPlugin.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Kint\\Zval\\Representation\\Representation' not found in wp-content/plugins/ns-cloner-site-copier/lib/vendor/kint-php/kint/src/Zval/Representation/SourceRepresentation.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
9 plugin tags: network, template, cloner, clone, automate...

ns-cloner-site-copier/ns-cloner.php 85% from 13 tests

The main PHP script in "NS Cloner - Site Copier" version 4.4 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 235 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ns-cloner-site-copier.php" instead of "ns-cloner.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected16,710 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
PHP1332,6045,90211,161
JavaScript102531503,259
Sass122511,399
CSS87333407
JSON600339
Markdown3450110
SVG20023
YAML13412

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.15
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces10
Interfaces3
Traits0
Classes109
▷ Abstract classes98.26%
▷ Concrete classes10091.74%
▷ Final classes33.00%
Methods609
▷ Static methods7512.32%
▷ Public methods51484.40%
▷ Protected methods6911.33%
▷ Private methods264.27%
Functions42
▷ Named functions2457.14%
▷ Anonymous functions1842.86%
Constants48
▷ Global constants1837.50%
▷ Class constants3062.50%
▷ Public constants30100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.58MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ns-follow.png4.95KB2.74KB▼ 44.66%
lib/vendor/harvesthq/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
images/banner-background.png286.44KB163.21KB▼ 43.02%
images/mcf-amazon-logo.png7.51KB4.09KB▼ 45.49%
images/ns-visit.png4.33KB2.60KB▼ 39.89%