84% mysterythemes-demo-importer

Code Review | Mystery Themes Demo Importer

WordPress plugin Mystery Themes Demo Importer scored84%from 54 tests.

About plugin

  • Plugin page: mysterythemes-dem...
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: May 12, 2020
  • Latest release: Oct 4, 2023
  • Number of updates: 39
  • Update frequency: every 31.8 days
  • Top authors: mysterythemes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10,000+ active /207,662 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▲985.20ms] 75% from 4 tests

An overview of server-side resources used by Mystery Themes Demo Importer
The following require your attention
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 985.20ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.10432.53 ▲388.09
Dashboard /wp-admin3.41 ▲0.101,224.30 ▲1,168.04
Posts /wp-admin/edit.php3.52 ▲0.161,286.07 ▲1,233.86
Add New Post /wp-admin/post-new.php5.93 ▲0.041,318.53 ▲1,222.08
Media Library /wp-admin/upload.php3.40 ▲0.171,195.88 ▲1,162.59

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Mystery Themes Demo Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.36 ▲0.081.52 ▼0.2142.03 ▼1.18
Dashboard /wp-admin2,208 ▲345.56 ▼0.0084.81 ▼13.9738.75 ▼4.12
Posts /wp-admin/edit.php2,116 ▲161.94 ▼0.0834.89 ▼6.9036.10 ▼0.05
Add New Post /wp-admin/post-new.php1,536 ▲820.93 ▼2.06609.60 ▼26.2354.04 ▼4.50
Media Library /wp-admin/upload.php1,416 ▲164.13 ▼0.1192.73 ▼15.2041.49 ▼4.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • mtdi_import_version
    • widget_recent-comments
    • can_compress_scripts

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
Almost there! Just fix the following items
  • 13× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/class-mtdi-loader.php
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/wp-importers/class-customizer-importer.php
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/wp-importers/class-widget-importer.php
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/class-mtdi-library.php
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/wp-importers/class-mtdi-importer.php
    • > /wp-content/plugins/mysterythemes-demo-importer/admin/class-mtdi-admin.php
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/class-mtdi-activator.php
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/wp-importers/customizer-class/customize-setting.php
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/wp-importers/class-mtdi-parsers.php
    • > /wp-content/plugins/mysterythemes-demo-importer/includes/class-mtdi.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Theme Demos listing page.), #2 (Install and activate the required plugins.), #3 (Finally, Import the Demo with just one click.)
The official readme.txt is a good inspiration

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

The main PHP file in "Mystery Themes Demo Importer" ver. 1.1.7 adds more information about the plugin and also serves as the entry point for this plugin
123 characters long description:
One Click Demo Importer For Mystery Themes official themes demo content, customization options, widgets and theme settings.

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
Everything looks great! No dangerous files found in this plugin7,716 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
XML185244,058
PHP147481,0343,160
CSS1494292
JavaScript198206

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity45.43
▷ Minimum class complexity1.00
▷ Maximum class complexity262.00
Average method complexity6.92
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods105
▷ Static methods87.62%
▷ Public methods9792.38%
▷ Protected methods10.95%
▷ Private methods76.67%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
PNG images were not found in this plugin