88% acf-options-for-polylang

Code Review | ACF Options For Polylang

WordPress plugin ACF Options For Polylang scored 88% from 54 tests.

About plugin

  • Plugin page: acf-options-for-p...
  • Plugin version: 1.1.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 5.9.2
  • First release: May 7, 2019
  • Latest release: Sep 1, 2021
  • Number of updates: 9
  • Update frequency: every 94.3 days
  • Top authors: momo360modena (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

7,000+ active / 48,609 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.02MB] [CPU: ▼298.30ms] Passed 4 tests

This is a short check of server-side resources used by ACF Options For Polylang
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0163.90 ▼1.37
Dashboard /wp-admin3.41 ▲0.0037.73 ▼8.18
Posts /wp-admin/edit.php3.65 ▲0.0039.52 ▼5.77
Add New Post /wp-admin/post-new.php6.88 ▼0.0998.02 ▼1,168.15
Media Library /wp-admin/upload.php3.30 ▲0.0031.55 ▼11.09

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF Options For Polylang
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4115.91 ▲0.276.83 ▼1.192.09 ▼0.52
Dashboard /wp-admin2,895 ▲346.21 ▲0.06131.86 ▼12.28165.68 ▲5.59
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.0162.43 ▼5.01134.65 ▼16.87
Add New Post /wp-admin/post-new.php1,752 ▲3521.59 ▼0.49452.43 ▲10.14159.15 ▲4.37
Media Library /wp-admin/upload.php1,698 ▲35.44 ▼0.09137.92 ▼20.85184.37 ▼15.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/acf-options-for-polylang/bea-acf-options-for-polylang.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Trait 'BEA\\ACF_Options_For_Polylang\\Singleton' not found in wp-content/plugins/acf-options-for-polylang/classes/main.php on line 5
    • > PHP Fatal error
      Trait 'BEA\\ACF_Options_For_Polylang\\Singleton' not found in wp-content/plugins/acf-options-for-polylang/classes/admin.php on line 5
    • > PHP Fatal error
      Trait 'BEA\\ACF_Options_For_Polylang\\Singleton' not found in wp-content/plugins/acf-options-for-polylang/classes/requirements.php on line 5
    • > PHP Warning
      Use of undefined constant BEA_ACF_OPTIONS_FOR_POLYLANG_DIR - assumed 'BEA_ACF_OPTIONS_FOR_POLYLANG_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/acf-options-for-polylang/autoload.php on line 195

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: advanced custom fields, acf, options page, polylang, options...

acf-options-for-polylang/bea-acf-options-for-polylang.php 92% from 13 tests

The main file in "ACF Options For Polylang" v. 1.1.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-options-for-polylang.php" instead of "bea-acf-options-for-polylang.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin493 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PO File43642182

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
▷ Static methods829.63%
▷ Public methods2177.78%
▷ Protected methods518.52%
▷ Private methods13.70%
▷ Named functions125.00%
▷ Anonymous functions375.00%
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 4.38MB with 2.85MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-1544x500.png3,275.90KB28.46KB▼ 99.13%
.wordpress-org/icon-128x128.png47.19KB12.91KB▼ 72.64%
.wordpress-org/banner-772x250.png1,013.58KB13.54KB▼ 98.66%
.wordpress-org/banner-github.png25.72KB11.76KB▼ 54.28%