84% acf-qtranslate

Code Review | ACF qTranslate

WordPress plugin ACF qTranslate scored84%from 54 tests.

About plugin

  • Plugin page: acf-qtranslate
  • Plugin version: 1.7.25
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 28, 2013
  • Latest release: Oct 26, 2018
  • Number of updates: 80
  • Update frequency: every 22.4 days
  • Top authors: funkjedi (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active /173,865 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
Installer ran successfully

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

An overview of server-side resources used by ACF qTranslate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.93 ▼3.45
Dashboard /wp-admin3.32 ▼0.0247.10 ▼17.81
Posts /wp-admin/edit.php3.38 ▲0.0249.04 ▼1.16
Add New Post /wp-admin/post-new.php5.90 ▲0.02109.63 ▲7.99
Media Library /wp-admin/upload.php3.25 ▲0.0230.74 ▼5.66
ACF qTranslate /wp-admin/options-general.php?page=acf-qtranslate3.2130.90

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF qTranslate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.62 ▼0.761.63 ▼0.1941.11 ▼0.30
Dashboard /wp-admin2,218 ▲305.86 ▼0.04106.62 ▼0.9042.87 ▲0.46
Posts /wp-admin/edit.php2,101 ▲92.02 ▲0.0241.21 ▼0.1634.78 ▼0.89
Add New Post /wp-admin/post-new.php1,524 ▼417.73 ▼5.64656.66 ▼16.9360.18 ▲2.41
Media Library /wp-admin/upload.php1,400 ▲94.22 ▲0.00103.00 ▲0.4942.12 ▼1.82
ACF qTranslate /wp-admin/options-general.php?page=acf-qtranslate8252.1825.4429.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 28× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require_once(ACF_QTRANSLATE_PLUGIN_DIRsrc/acf_interface.php): failed to open stream: No such file or directory in wp-content/plugins/acf-qtranslate/src/acf_4/acf.php on line 3
    • > PHP Warning
      require_once(ACF_QTRANSLATE_PLUGIN_DIRsrc/acf_interface.php): failed to open stream: No such file or directory in wp-content/plugins/acf-qtranslate/src/qtranslatex.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/acf-qtranslate/acf-qtranslate.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_post_object' not found in wp-content/plugins/acf-qtranslate/src/acf_5/fields/post_object.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_file' not found in wp-content/plugins/acf-qtranslate/src/acf_5/fields/file.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_text' not found in wp-content/plugins/acf-qtranslate/src/acf_4/fields/text.php:3
    • > PHP Warning
      Use of undefined constant ACF_QTRANSLATE_PLUGIN_DIR - assumed 'ACF_QTRANSLATE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/acf-qtranslate/src/qtranslatex.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_wysiwyg' not found in wp-content/plugins/acf-qtranslate/src/acf_5/fields/wysiwyg.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ACF_QTRANSLATE_PLUGIN_DIRsrc/acf_interface.php' (include_path='.:/usr/share/php') in wp-content/plugins/acf-qtranslate/src/ppqtranslate.php on line 3
    • > PHP Warning
      Use of undefined constant ACF_QTRANSLATE_PLUGIN_DIR - assumed 'ACF_QTRANSLATE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/acf-qtranslate/src/mqtranslate.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: advanced custom fields, acf, admin, qtranslate, add-on

acf-qtranslate/acf-qtranslate.php Passed 13 tests

Analyzing the main PHP file in "ACF qTranslate" version 1.7.25
74 characters long description:
Provides multilingual versions of the text, text area, and wysiwyg fields.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,020 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP224831,0241,621
JavaScript49468301
CSS120098

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.11
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods99
▷ Static methods00.00%
▷ Public methods99100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 files were detected