78% theme-one-click-demo-import

Code Review | Theme One Click Demo Importer

WordPress plugin Theme One Click Demo Importer scored78%from 54 tests.

About plugin

  • Plugin page: theme-one-click-d...
  • Plugin version: 2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5.1
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Oct 13, 2020
  • Number of updates: 59
  • Update frequency: every 5.2 days
  • Top authors: theme404 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /44,141 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Theme One Click Demo Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3344.16 ▲3.36
Dashboard /wp-admin3.63 ▲0.3359.71 ▲7.38
Posts /wp-admin/edit.php3.68 ▲0.3252.25 ▲2.18
Add New Post /wp-admin/post-new.php6.15 ▲0.2688.29 ▼4.59
Media Library /wp-admin/upload.php3.49 ▲0.2639.23 ▲4.10

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Theme One Click Demo Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲2014.31 ▼0.281.87 ▼0.2843.47 ▼0.79
Dashboard /wp-admin2,215 ▲355.65 ▼0.0394.18 ▼1.8241.97 ▼2.67
Posts /wp-admin/edit.php2,120 ▲202.02 ▲0.0335.77 ▼5.2735.91 ▼0.63
Add New Post /wp-admin/post-new.php1,538 ▲1217.67 ▲0.01683.88 ▲13.8257.21 ▲3.16
Media Library /wp-admin/upload.php1,417 ▲204.25 ▲0.0197.39 ▼13.5040.95 ▼5.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/theme-one-click-demo-import/inc/views/popups/failed.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/theme-one-click-demo-import/inc/views/complete.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/theme-one-click-demo-import/inc/views/body.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/theme-one-click-demo-import/inc/views/plugins-list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/theme-one-click-demo-import/inc/views/popups/information.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/theme-one-click-demo-import/inc/views/popups/purchase-theme.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/theme-one-click-demo-import/inc/views/importing.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/theme-one-click-demo-import/inc/views/popups/activate-theme.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/theme-one-click-demo-import/inc/views/import.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Theme Demos listing page.), #2 (Install and activate the required plugins.), #3 (Finally, Import the Demo with just one click.)
You can take inspiration from this readme.txt

theme-one-click-demo-import/theme-one-click-demo-import.php 85% from 13 tests

The main PHP script in "Theme One Click Demo Importer" version 2.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin9,583 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP251,5342,2964,938
JavaScript27803232,890
CSS2349581,755

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity63.50
▷ Minimum class complexity1.00
▷ Maximum class complexity284.00
Average method complexity4.87
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods194
▷ Static methods115.67%
▷ Public methods10654.64%
▷ Protected methods6935.57%
▷ Private methods199.79%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants2385.19%
▷ Class constants414.81%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected