78% acf-options-for-polylang

Code Review | ACF Options For Polylang

WordPress plugin ACF Options For Polylang scored78%from 54 tests.

About plugin

  • Plugin page: acf-options-for-p...
  • Plugin version: 1.1.11
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: May 7, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 10
  • Update frequency: every 155.6 days
  • Top authors: momo360modena (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

10,000+ active /99,357 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.27ms] Passed 4 tests

This is a short check of server-side resources used by ACF Options For Polylang
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.0042.95 ▼3.13
Dashboard /wp-admin3.57 ▲0.0053.63 ▲2.15
Posts /wp-admin/edit.php3.68 ▲0.0048.46 ▼6.19
Add New Post /wp-admin/post-new.php6.15 ▲0.0087.23 ▼29.90
Media Library /wp-admin/upload.php3.49 ▲0.0041.42 ▲5.32

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ACF Options For Polylang
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.44 ▲0.181.97 ▲0.1543.78 ▼0.55
Dashboard /wp-admin2,198 ▲245.65 ▲0.0786.62 ▼2.7641.48 ▼2.69
Posts /wp-admin/edit.php2,097 ▼62.11 ▲0.1336.11 ▼7.1035.83 ▼2.20
Add New Post /wp-admin/post-new.php1,531 ▼023.21 ▼0.05642.08 ▼21.7551.52 ▼4.28
Media Library /wp-admin/upload.php1,403 ▲34.24 ▼0.02100.16 ▼4.3543.38 ▼6.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 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 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
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

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: options, option, advanced custom fields, options page, polylang...

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.11 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as 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 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin493 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8110328311
PO File43642182

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
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
Namespaces1
Interfaces0
Traits1
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods27
▷ Static methods829.63%
▷ Public methods2177.78%
▷ Protected methods518.52%
▷ Private methods13.70%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants6
▷ 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 3.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-772x250.png1,013.58KB13.54KB▼ 98.66%
.wordpress-org/banner-1544x500.png3,275.90KB28.46KB▼ 99.13%
.wordpress-org/icon-128x128.png47.19KB12.91KB▼ 72.64%
.wordpress-org/icon-256x256.png47.19KB12.91KB▼ 72.64%
.wordpress-org/banner-github-old.png80.44KB80.57KB0.00%