94% acf-wpml-theme-options

Code Review | ACF WPML Theme Options

WordPress plugin ACF WPML Theme Options scored 94% from 54 tests.

About plugin

  • Plugin page: acf-wpml-theme-op...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 5.9.2
  • First release: Aug 22, 2017
  • Latest release: Nov 16, 2017
  • Number of updates: 10
  • Update frequency: every 8.7 days
  • Top authors: railmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 748 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼296.44ms] Passed 4 tests

Analyzing server-side resources used by ACF WPML Theme Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.0363.58 ▲2.67
Dashboard /wp-admin4.12 ▲0.0937.68 ▼0.99
Posts /wp-admin/edit.php4.40 ▲0.0743.97 ▼1.53
Add New Post /wp-admin/post-new.php7.99 ▲0.4088.45 ▼1,181.36
Media Library /wp-admin/upload.php4.10 ▲0.1227.60 ▼1.87

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

ACF WPML Theme Options: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,829 ▲7115.40 ▼0.306.13 ▲0.253.00 ▲0.23
Dashboard /wp-admin2,925 ▲676.02 ▼0.11116.92 ▼24.50147.68 ▼64.05
Posts /wp-admin/edit.php2,720 ▲323.25 ▲0.0267.07 ▲0.62148.93 ▼1.03
Add New Post /wp-admin/post-new.php1,669 ▲820.23 ▲4.51379.34 ▼54.45188.68 ▼1.09
Media Library /wp-admin/upload.php1,732 ▲375.54 ▲0.11143.57 ▼9.15167.48 ▼52.77

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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
Even though no errors were found, 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
The following issues need your attention
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'ACFWPMLInterfaceAdmin' not found in wp-content/plugins/acf-wpml-theme-options/admin/controllers/config.class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-wpml-theme-options/admin/controllers/interface.class.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/acf-wpml-theme-options/acf-wpml-theme-options.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-wpml-theme-options/admin/controllers/ajax.class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-wpml-theme-options/globals/controllers/reqs.class.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: wpml, settings, acfpro, translations, acf...

acf-wpml-theme-options/acf-wpml-theme-options.php 92% from 13 tests

"ACF WPML Theme Options" version 1.0.0'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 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected776 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity22.50
▷ Minimum class complexity2.00
▷ Maximum class complexity54.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected