93% add-polylang-support-for-customizer

Code Review | Add Polylang support for Customizer

WordPress plugin Add Polylang support for Customizer scored 93% from 54 tests.

About plugin

  • Plugin page: add-polylang-supp...
  • Plugin version: 1.4.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.9.2
  • First release: Feb 1, 2020
  • Latest release: Sep 30, 2021
  • Number of updates: 40
  • Update frequency: every 15.2 days
  • Top authors: richardevcom (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active / 8,867 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Add Polylang support for Customizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0155.83 ▲4.95
Dashboard /wp-admin3.41 ▲0.0032.09 ▼0.05
Posts /wp-admin/edit.php3.64 ▲0.0035.37 ▼0.56
Add New Post /wp-admin/post-new.php6.88 ▼0.0991.39 ▼1,239.76
Media Library /wp-admin/upload.php3.29 ▲0.0025.52 ▲0.75

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Add Polylang support for Customizer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,814 ▲8816.05 ▲0.376.10 ▲0.192.57 ▼0.34
Dashboard /wp-admin2,914 ▲536.16 ▼0.00115.04 ▼20.25156.73 ▼4.54
Posts /wp-admin/edit.php2,705 ▲143.24 ▲0.0162.19 ▲0.35141.01 ▲3.05
Add New Post /wp-admin/post-new.php1,764 ▲10321.00 ▲4.70435.88 ▲26.51162.56 ▲9.72
Media Library /wp-admin/upload.php1,717 ▲195.52 ▲0.02145.85 ▼2.47189.26 ▲0.14

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
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Richardevcom\\Apsfc\\add_action() in wp-content/plugins/add-polylang-support-for-customizer/includes/class-apsfc.php:111

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

add-polylang-support-for-customizer/apsfc.php 85% from 13 tests

The main PHP script in "Add Polylang support for Customizer" version 1.4.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-polylang-support-for-customizer.php" instead of "apsfc.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
Good job! No executable or dangerous file extensions detected612 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PO File76166228

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
▷ Static methods14.76%
▷ Public methods1780.95%
▷ Protected methods314.29%
▷ Private methods14.76%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin