83% falang-wpml-importer

Code Review | Falang WPML importer

WordPress plugin Falang WPML importer scored83%from 54 tests.

About plugin

  • Plugin page: falang-wpml-importer
  • Plugin version: 0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Jun 14, 2022
  • Latest release: Jun 14, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: sbouey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /255 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.75ms] Passed 4 tests

Server-side resources used by Falang WPML importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.75 ▲6.49
Dashboard /wp-admin3.31 ▲0.0144.71 ▼7.70
Posts /wp-admin/edit.php3.36 ▲0.0145.30 ▼0.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.51 ▼7.50
Media Library /wp-admin/upload.php3.24 ▲0.0137.32 ▲4.61

Server storage [IO: ▲0.20MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Falang WPML importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.20 ▼1.201.69 ▲0.1742.50 ▲1.76
Dashboard /wp-admin2,212 ▲215.88 ▼0.02101.74 ▲3.2538.63 ▼0.57
Posts /wp-admin/edit.php2,094 ▲52.05 ▲0.0532.56 ▼2.4735.43 ▲0.27
Add New Post /wp-admin/post-new.php1,548 ▲2923.36 ▲0.53641.21 ▼11.0964.54 ▲14.07
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.02103.74 ▲2.7945.69 ▲5.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/falang-wpml-importer/falang-wpml-importer.php on line 87
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/falang-wpml-importer/falang-wpml-importer.php on line 87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/falang-wpml-importer/falang-wpml-importer.php:88
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/falang-wpml-importer/falang-wpml-importer.php on line 87

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "www.faboba.com/falangw/"
You can look at the official readme.txt

falang-wpml-importer/falang-wpml-importer.php 85% from 13 tests

This is the main PHP file of "Falang WPML importer" version 0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin526 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1108233448
JavaScript1141369
YAML1009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/icon-256x256.png15.63KB6.51KB▼ 58.36%
.wordpress-org/banner-772x250.png27.54KB11.50KB▼ 58.25%
.wordpress-org/icon-128x128.png12.56KB4.50KB▼ 64.15%
.wordpress-org/screenshot-1.png31.39KB9.32KB▼ 70.31%
.wordpress-org/banner-1544x500.png47.62KB21.57KB▼ 54.71%