77% skt-themes-demo-importer

Code Review | SKT Themes Demo Import

WordPress plugin SKT Themes Demo Import scored77%from 54 tests.

About plugin

  • Plugin page: skt-themes-demo-i...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jul 3, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 9
  • Update frequency: every 91.3 days
  • Top authors: sonalsinha21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /18,722 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼8.53ms] Passed 4 tests

An overview of server-side resources used by SKT Themes Demo Import
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4839.31 ▼5.40
Dashboard /wp-admin3.78 ▲0.4451.85 ▼13.02
Posts /wp-admin/edit.php3.83 ▲0.4855.94 ▲7.13
Add New Post /wp-admin/post-new.php6.30 ▲0.4288.68 ▼22.81
Media Library /wp-admin/upload.php3.64 ▲0.4141.61 ▲8.25
SKT Import Content /wp-admin/themes.php?page=skt-themes-demo-import3.6137.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by SKT Themes Demo Import
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.26 ▲0.061.84 ▼0.3341.00 ▼2.41
Dashboard /wp-admin2,199 ▲225.64 ▲0.1083.37 ▼4.4239.50 ▼14.50
Posts /wp-admin/edit.php2,104 ▲72.05 ▲0.0339.80 ▲4.0635.32 ▼2.28
Add New Post /wp-admin/post-new.php1,528 ▼1217.64 ▼5.74646.29 ▼23.9957.08 ▲8.49
Media Library /wp-admin/upload.php1,404 ▲14.22 ▲0.0399.59 ▼1.1743.73 ▲0.87
SKT Import Content /wp-admin/themes.php?page=skt-themes-demo-import8851.8135.3965.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/skt-themes-demo-importer/skt-themes-demo-import.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SKT_WP_Importer_Logger' not found in wp-content/plugins/skt-themes-demo-importer/inc/importer/class-logger-cli.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-customizer-option.php:12
    • > PHP Warning
      require(SKT_PATHinc/importer/class-wxr-importer.php): failed to open stream: No such file or directory in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-wxr-importer.php on line 11
    • > PHP Warning
      require(SKT_PATHinc/importer/class-logger.php): failed to open stream: No such file or directory in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-logger.php on line 9
    • > PHP Fatal error
      require(): Failed opening required 'SKT_PATHinc/importer/class-wxr-importer.php' (include_path='.:/usr/share/php') in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-wxr-importer.php on line 11
    • > PHP Warning
      require(SKT_PATHinc/class-skt-helpers.php): failed to open stream: No such file or directory in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-main.php on line 9
    • > PHP Warning
      Use of undefined constant SKT_PATH - assumed 'SKT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-main.php on line 9
    • > PHP Warning
      Use of undefined constant SKT_PATH - assumed 'SKT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-logger.php on line 9
    • > PHP Fatal error
      require(): Failed opening required 'SKT_PATHinc/class-skt-helpers.php' (include_path='.:/usr/share/php') in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-main.php on line 9
    • > PHP Warning
      Use of undefined constant SKT_PATH - assumed 'SKT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/skt-themes-demo-importer/inc/class-skt-wxr-importer.php on line 11

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (screenshot1.png) image missing
The official readme.txt is a good inspiration

skt-themes-demo-importer/skt-themes-demo-import.php 77% from 13 tests

The principal PHP file in "SKT Themes Demo Import" v. 1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("skt-themes-demo-importer.php" instead of "skt-themes-demo-import.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected2,652 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP127341,1972,504
CSS125787
JavaScript112761

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity38.27
▷ Minimum class complexity1.00
▷ Maximum class complexity262.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods108
▷ Static methods2321.30%
▷ Public methods5752.78%
▷ Protected methods3431.48%
▷ Private methods1715.74%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin