83% add-polylang-support-for-customizer

Code Review | Add Polylang support for Customizer

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

About plugin

  • Plugin page: add-polylang-supp...
  • Plugin version: 1.4.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2020
  • Latest release: Jan 4, 2023
  • Number of updates: 42
  • Update frequency: every 25.4 days
  • Top authors: richardevcom (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /16,267 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.00MB] [CPU: ▼3.63ms] Passed 4 tests

This is a short check of server-side resources used by Add Polylang support for Customizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.42 ▼3.20
Dashboard /wp-admin3.31 ▲0.0146.31 ▼1.91
Posts /wp-admin/edit.php3.36 ▲0.0047.44 ▲7.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.15 ▼9.09
Media Library /wp-admin/upload.php3.23 ▲0.0034.20 ▼0.31

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Add Polylang support for Customizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.27 ▼1.381.76 ▼0.2342.60 ▼5.98
Dashboard /wp-admin2,218 ▲304.90 ▲0.03107.24 ▼13.9843.30 ▼2.08
Posts /wp-admin/edit.php2,100 ▲112.02 ▼0.0339.59 ▼1.1535.63 ▼0.36
Add New Post /wp-admin/post-new.php1,545 ▲1223.24 ▲0.04660.49 ▲26.3854.71 ▼1.58
Media Library /wp-admin/upload.php1,397 ▲154.29 ▲0.0698.69 ▲2.8941.52 ▼3.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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)
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
Almost there! Just fix the following items
  • 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 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("paypal.me/ricardsmucelans")
You can look at the official readme.txt

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

The entry point to "Add Polylang support for Customizer" version 1.4.5 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin611 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP471200336
PO File76166228
JavaScript191247

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
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
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods21
▷ Static methods14.76%
▷ Public methods1780.95%
▷ Protected methods314.29%
▷ Private methods14.76%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ 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