84% wpelemento-importer

Code Review | WPElemento Importer

WordPress plugin WPElemento Importer scored84%from 54 tests.

About plugin

  • Plugin page: wpelemento-importer
  • Plugin version: 0.3.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 39
  • Update frequency: every 13.8 days
  • Top authors: wpelemento (100%)

Code review

54 tests

User reviews

1 review

Install metrics

5,000+ active /64,459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by WPElemento Importer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.11 ▲0.6441.10 ▲0.59
Dashboard /wp-admin3.94 ▲0.5953.67 ▼9.47
Posts /wp-admin/edit.php4.00 ▲0.6358.25 ▲10.65
Add New Post /wp-admin/post-new.php6.46 ▲0.5799.70 ▼1.01
Media Library /wp-admin/upload.php3.81 ▲0.5747.29 ▲12.25
Install Plugins /wp-admin/themes.php?page=wpelemento-importer-tgmpa-install-plugins3.8738.91

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPElemento Importer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9514.26 ▼0.471.56 ▼0.0735.84 ▼9.01
Dashboard /wp-admin2,241 ▲645.62 ▼0.0693.98 ▼7.9357.76 ▲11.86
Posts /wp-admin/edit.php2,164 ▲642.19 ▲0.2041.42 ▲4.6052.66 ▲17.07
Add New Post /wp-admin/post-new.php1,573 ▲4723.41 ▲0.07594.96 ▼73.3568.25 ▲26.01
Media Library /wp-admin/upload.php1,460 ▲604.20 ▼0.0297.73 ▲1.3859.39 ▲18.21
Install Plugins /wp-admin/themes.php?page=wpelemento-importer-tgmpa-install-plugins1,0382.0224.0639.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/wpelemento-importer/theme-wizard/config.php:17
    • > PHP Warning
      Use of undefined constant EDI_DIR - assumed 'EDI_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpelemento-importer/theme-wizard/tgm/tgm.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wpelemento-importer/theme-wizard/tgm/class-tgm-plugin-activation.php:2012
    • > PHP Fatal error
      require(): Failed opening required 'EDI_DIRtheme-wizard/tgm/class-tgm-plugin-activation.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpelemento-importer/theme-wizard/tgm/tgm.php on line 2
    • > PHP Warning
      require(EDI_DIRtheme-wizard/tgm/class-tgm-plugin-activation.php): failed to open stream: No such file or directory in wp-content/plugins/wpelemento-importer/theme-wizard/tgm/tgm.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wpelemento-importer/plugin.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: templates, website builder, one click demo import

wpelemento-importer/plugin.php 92% from 13 tests

This is the main PHP file of "WPElemento Importer" version 0.3.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpelemento-importer.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin4,261 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP55221,7092,720
CSS2919913
JavaScript39443628

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity58.12
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods141
▷ Static methods139.22%
▷ Public methods11883.69%
▷ Protected methods2316.31%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.03MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
theme-wizard/assets/images/check-mark.png10.44KB9.66KB▼ 7.47%
theme-wizard/assets/images/battery.png9.22KB8.25KB▼ 10.49%
theme-wizard/assets/images/plugin.png6.19KB5.24KB▼ 15.26%