84% envothemes-importer-kingcomposer

Code Review | EnvoThemes Demo Importer for KingComposer

WordPress plugin EnvoThemes Demo Importer for KingComposer scored 84% from 54 tests.

About plugin

  • Plugin page: envothemes-import...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Nov 14, 2017
  • Latest release: Jan 25, 2018
  • Number of updates: 14
  • Update frequency: every 5.3 days
  • Top authors: envothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 43,503 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by EnvoThemes Demo Importer for KingComposer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.30 ▼4.85
Dashboard /wp-admin3.36 ▲0.0644.99 ▼2.95
Posts /wp-admin/edit.php3.47 ▲0.1249.61 ▼3.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0694.68 ▲3.61
Media Library /wp-admin/upload.php3.28 ▲0.0536.62 ▼0.11
EnvoThemes Demo Import /wp-admin/themes.php?page=et-import3.2531.64

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for EnvoThemes Demo Importer for KingComposer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲4913.20 ▼1.221.82 ▼0.2742.95 ▼2.47
Dashboard /wp-admin2,226 ▲384.86 ▼0.04112.47 ▲0.6046.53 ▲0.05
Posts /wp-admin/edit.php2,111 ▲192.00 ▼0.0239.90 ▼2.7238.20 ▲0.78
Add New Post /wp-admin/post-new.php1,550 ▲2223.19 ▲5.00629.30 ▲10.1853.59 ▼1.42
Media Library /wp-admin/upload.php1,408 ▲174.28 ▼0.0395.75 ▼3.4543.56 ▼1.11
EnvoThemes Demo Import /wp-admin/themes.php?page=et-import7792.0328.1826.99

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/envothemes-importer-kingcomposer/inc/useful-plugins.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/envothemes-importer-kingcomposer/inc/admin-page.php:240
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envothemes-importer-kingcomposer/inc/welcome.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: import, kingcomposer, content, demo, data...

envothemes-importer-kingcomposer/envothemes-importer-kingcomposer.php 92% from 13 tests

Analyzing the main PHP file in "EnvoThemes Demo Importer for KingComposer" version 1.0.4
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected903 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
XML1716468
PHP47455349
CSS12186

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity6.20
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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