78% smartcat-wpml

Code Review | Smartcat Integration for WPML

WordPress plugin Smartcat Integration for WPML scored 78% from 54 tests.

About plugin

  • Plugin page: smartcat-wpml
  • Plugin version: 1.3.42
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.8
  • WordPress version: 5.9.2
  • First release: Aug 18, 2021
  • Latest release: Feb 8, 2022
  • Number of updates: 51
  • Update frequency: every 3.4 days
  • Top authors: smartcatai (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 935 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼308.44ms] Passed 4 tests

An overview of server-side resources used by Smartcat Integration for WPML
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3458.18 ▲7.90
Dashboard /wp-admin3.70 ▲0.2839.39 ▲5.86
Posts /wp-admin/edit.php3.98 ▲0.3440.26 ▼1.85
Add New Post /wp-admin/post-new.php7.25 ▲0.2798.00 ▼1,238.54
Media Library /wp-admin/upload.php3.64 ▲0.3426.45 ▲0.79
Smartcat Integration for WPML /wp-admin/options-general.php?page=smartcat-wpml3.6327.06

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: 1 new table, 2 new options
New tables
wp_smartcat_logs
New WordPress options
smartcat_wpml_acf_using
smartcat_wpml_secret

Browser metrics Passed 4 tests

A check of browser resources used by Smartcat Integration for WPML
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,816 ▲7215.99 ▲0.405.62 ▼0.362.28 ▲0.26
Dashboard /wp-admin2,906 ▲516.05 ▼0.19121.15 ▼19.44158.99 ▼7.50
Posts /wp-admin/edit.php2,712 ▲213.25 ▲0.0164.06 ▼6.22144.64 ▼5.08
Add New Post /wp-admin/post-new.php1,674 ▲817.20 ▼3.67440.58 ▲6.19174.82 ▲13.83
Media Library /wp-admin/upload.php1,719 ▲215.55 ▲0.04141.41 ▼1.18190.21 ▲1.28
Smartcat Integration for WPML /wp-admin/options-general.php?page=smartcat-wpml1,1232.6952.31106.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 options in the database
    • smartcat_wpml_acf_using
    • smartcat_wpml_secret

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/smartcat-wpml/public/partials/smartcat-wpml-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/smartcat-wpml/admin/partials/smartcat-wpml-display.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/smartcat-wpml/smartcat-wpml.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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: Please take inspiration from this readme.txt

smartcat-wpml/smartcat-wpml.php Passed 13 tests

Analyzing the main PHP file in "Smartcat Integration for WPML" version 1.3.42
102 characters long description:
Smartcat Integration Add-on allows you to synchronize your site content for localization with Smartcat

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,026 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP253651751,890
PO File1121264
SVG10046
JavaScript14026

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.75
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods135
▷ Static methods21.48%
▷ Public methods8260.74%
▷ Protected methods00.00%
▷ Private methods5339.26%
Functions16
▷ Named functions318.75%
▷ Anonymous functions1381.25%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ 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
There were not PNG files found in your plugin