84% lsx-importer-for-wetu

Code Review | LSX Content Importer for Wetu

WordPress plugin LSX Content Importer for Wetu scored84%from 54 tests.

About plugin

  • Plugin page: lsx-importer-for-...
  • Plugin version: 1.4.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2019
  • Latest release: Aug 11, 2023
  • Number of updates: 23
  • Update frequency: every 65.7 days
  • Top authors: feedmymedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,225 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.76MB] [CPU: ▼1.60ms] Passed 4 tests

A check of server-side resources used by LSX Content Importer for Wetu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.26 ▲0.8051.55 ▲6.88
Dashboard /wp-admin4.10 ▲0.7958.64 ▲5.19
Posts /wp-admin/edit.php4.15 ▲0.7953.59 ▼4.66
Add New Post /wp-admin/post-new.php6.62 ▲0.7394.08 ▼13.43
Media Library /wp-admin/upload.php3.96 ▲0.7344.08 ▲6.52
Importer /wp-admin/admin.php?page=lsx-wetu-importer3.9342.10

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for LSX Content Importer for Wetu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.211.71 ▼0.1243.65 ▼3.33
Dashboard /wp-admin2,195 ▲185.62 ▼0.05101.87 ▲6.1043.55 ▲3.82
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0938.58 ▼1.7034.77 ▼0.29
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▲0.10694.38 ▲39.1859.50 ▲10.86
Media Library /wp-admin/upload.php1,394 ▼34.24 ▲0.0698.21 ▼19.1044.98 ▼0.66
Importer /wp-admin/admin.php?page=lsx-wetu-importer9682.0224.4626.61

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_WETU_Importer' not found in wp-content/plugins/lsx-importer-for-wetu/classes/class-lsx-wetu-importer-tours.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_WETU_Importer_Admin' not found in wp-content/plugins/lsx-importer-for-wetu/classes/class-lsx-wetu-importer-connect-accommodation.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lsx\\wetu_importer\\classes\\add_action() in wp-content/plugins/lsx-importer-for-wetu/classes/class-wetu-automation.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_WETU_Importer' not found in wp-content/plugins/lsx-importer-for-wetu/classes/class-lsx-wetu-importer-banner-integration.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lsx-importer-for-wetu/classes/class-lsx-wetu-importer.php:200
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_WETU_Importer' not found in wp-content/plugins/lsx-importer-for-wetu/classes/class-lsx-wetu-importer-accommodation.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_WETU_Importer' not found in wp-content/plugins/lsx-importer-for-wetu/classes/class-lsx-wetu-importer-destination.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lsx-importer-for-wetu/lsx-importer-for-wetu.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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: You can look at the official readme.txt

lsx-importer-for-wetu/lsx-importer-for-wetu.php 92% from 13 tests

"LSX Content Importer for Wetu" version 1.4.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin11,083 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JSON1004,870
PHP128711,3334,394
JavaScript56540726
Sass1370283
PO File1124126261
CSS3313199
YAML450185
Markdown1630121
XML113944

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity99.40
▷ Minimum class complexity2.00
▷ Maximum class complexity296.00
Average method complexity7.04
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods163
▷ Static methods84.91%
▷ Public methods16299.39%
▷ Protected methods00.00%
▷ Private methods10.61%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin