84% polylang-assets-urls-fix

Code Review | Polylang assets URLs fix

WordPress plugin Polylang assets URLs fix scored84%from 54 tests.

About plugin

  • Plugin page: polylang-assets-u...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Apr 7, 2016
  • Number of updates: 7
  • Update frequency: every 38.4 days
  • Top authors: Kubitomakita (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,473 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by Polylang assets URLs fix
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.72 ▼1.37
Dashboard /wp-admin3.31 ▼0.0352.04 ▼9.36
Posts /wp-admin/edit.php3.36 ▲0.0147.24 ▼3.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.86 ▼35.36
Media Library /wp-admin/upload.php3.23 ▲0.0134.05 ▼4.65

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Polylang assets URLs fix
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.491.89 ▲0.1345.90 ▲0.44
Dashboard /wp-admin2,198 ▲215.57 ▼0.0988.28 ▼6.6941.64 ▲1.19
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0238.65 ▼4.2034.88 ▼3.28
Add New Post /wp-admin/post-new.php1,527 ▲123.27 ▼0.06665.91 ▼1.7649.58 ▼7.60
Media Library /wp-admin/upload.php1,403 ▲64.22 ▼0.0297.86 ▼7.2145.16 ▼2.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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)
Good news, no errors were detected

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
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/polylang-assets-urls-fix/polylang-assets-urls-fix.php on line 68
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/polylang-assets-urls-fix/polylang-assets-urls-fix.php on line 68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/polylang-assets-urls-fix/polylang-assets-urls-fix.php:71
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/polylang-assets-urls-fix/polylang-assets-urls-fix.php on line 68

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === polylang-assets-urls-fix === )
You can take inspiration from this readme.txt

polylang-assets-urls-fix/polylang-assets-urls-fix.php Passed 13 tests

The main PHP script in "Polylang assets URLs fix" version 1.1 is automatically included on every request by WordPress
87 characters long description:
This plugin properly handles assets URLs when using different domains for each language

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 plugin34 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1202134

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin