84% hashthemes-demo-importer

Code Review | HashThemes Demo Importer

WordPress plugin HashThemes Demo Importer scored84%from 54 tests.

About plugin

  • Plugin page: hashthemes-demo-i...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 28, 2020
  • Latest release: Sep 1, 2023
  • Number of updates: 46
  • Update frequency: every 27.9 days
  • Top authors: hashthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

9,000+ active /114,445 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.39ms] Passed 4 tests

Analyzing server-side resources used by HashThemes Demo Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.38 ▼3.04
Dashboard /wp-admin3.34 ▲0.0449.23 ▲0.78
Posts /wp-admin/edit.php3.46 ▲0.1042.21 ▼2.88
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.66 ▼20.42
Media Library /wp-admin/upload.php3.27 ▲0.0438.60 ▲3.92
HashThemes Demo Importer /wp-admin/themes.php?page=hdi-demo-importer3.2430.24

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for HashThemes Demo Importer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.25 ▼1.061.86 ▲0.1243.65 ▼2.64
Dashboard /wp-admin2,221 ▲305.96 ▲1.0799.97 ▼6.4840.87 ▼2.96
Posts /wp-admin/edit.php2,104 ▲152.13 ▲0.0934.66 ▼8.8131.36 ▼7.84
Add New Post /wp-admin/post-new.php1,528 ▼1423.43 ▲5.00669.95 ▲63.3938.20 ▼16.61
Media Library /wp-admin/upload.php1,403 ▲154.37 ▲0.1495.69 ▼1.3941.14 ▼2.42
HashThemes Demo Importer /wp-admin/themes.php?page=hdi-demo-importer8111.7924.1024.96

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/hashthemes-demo-importer/classes/class-customizer-option.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Importer' not found in wp-content/plugins/hashthemes-demo-importer/wordpress-importer/class-wp-import.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hashthemes-demo-importer/import_config.php:1277

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: content, demo importer, one click import, import, widgets...

hashthemes-demo-importer/hashthemes-demo-importer.php Passed 13 tests

"HashThemes Demo Importer" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
40 characters long description:
Easily imports demo with just one click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin7,309 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP136886454,138
JavaScript25558512,307
CSS21500864

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity58.60
▷ Minimum class complexity1.00
▷ Maximum class complexity226.00
Average method complexity6.53
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes220.00%
Methods103
▷ Static methods1413.59%
▷ Public methods9592.23%
▷ Protected methods32.91%
▷ Private methods54.85%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin