84% sparkle-demo-importer

Code Review | Sparkle Demo Importer

WordPress plugin Sparkle Demo Importer scored84%from 54 tests.

About plugin

  • Plugin page: sparkle-demo-impo...
  • Plugin version: 1.4.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 2, 2020
  • Latest release: Jul 12, 2023
  • Number of updates: 61
  • Update frequency: every 15.6 days
  • Top authors: sparklewpthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /186,915 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by Sparkle Demo Importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.25 ▲0.7940.81 ▼3.05
Dashboard /wp-admin4.30 ▲1.0048.66 ▼1.56
Posts /wp-admin/edit.php4.30 ▲0.9551.14 ▲2.44
Add New Post /wp-admin/post-new.php6.17 ▲0.2892.94 ▲5.21
Media Library /wp-admin/upload.php4.30 ▲1.0837.85 ▲5.31
Sparkle Demo Import /wp-admin/themes.php?page=sparkle-theme-demo-importer4.3134.29

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Sparkle Demo Importer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.29 ▼1.001.84 ▼0.0741.57 ▼1.52
Dashboard /wp-admin2,218 ▲295.06 ▲0.12111.43 ▼7.4240.82 ▼4.64
Posts /wp-admin/edit.php2,107 ▲152.32 ▲0.3244.98 ▼0.4035.16 ▼3.03
Add New Post /wp-admin/post-new.php1,528 ▲1423.14 ▲5.52592.44 ▼85.8148.90 ▼13.66
Media Library /wp-admin/upload.php1,403 ▲124.30 ▲0.0996.23 ▼10.7942.09 ▼2.13
Sparkle Demo Import /wp-admin/themes.php?page=sparkle-theme-demo-importer8251.7724.7328.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sparkle-demo-importer/import_config.php:7749
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Importer' not found in wp-content/plugins/sparkle-demo-importer/wordpress-importer/class-wp-import.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/sparkle-demo-importer/classes/class-customizer-option.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: importer, sparkle demo data, demo content, sparklestore demo data, demo data...

sparkle-demo-importer/sparkle-demo-importer.php 92% from 13 tests

"Sparkle Demo Importer" version 1.4.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin14,382 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP147961,14211,679
JavaScript25598602,314
CSS1710389

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity55.80
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity6.41
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes213.33%
Methods152
▷ Static methods149.21%
▷ Public methods14394.08%
▷ Protected methods42.63%
▷ Private methods53.29%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin