84% wpematico-polylang

Code Review | WPeMatico Polylang

WordPress plugin WPeMatico Polylang scored84%from 54 tests.

About plugin

  • Plugin page: wpematico-polylang
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5
  • WordPress version: 6.3.1
  • First release: Apr 3, 2020
  • Latest release: Jul 23, 2020
  • Number of updates: 4
  • Update frequency: every 27.8 days
  • Top authors: etruel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,236 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: ▼1.25ms] Passed 4 tests

A check of server-side resources used by WPeMatico Polylang
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.22 ▲0.80
Dashboard /wp-admin3.31 ▲0.0047.40 ▼0.78
Posts /wp-admin/edit.php3.36 ▲0.0048.14 ▲0.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.35 ▼4.73
Media Library /wp-admin/upload.php3.23 ▲0.0035.72 ▲0.17

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

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

Browser metrics Passed 4 tests

WPeMatico Polylang: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.291.64 ▼0.2844.37 ▲2.35
Dashboard /wp-admin2,195 ▲185.56 ▼0.0586.70 ▼0.3537.71 ▼3.95
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0239.33 ▲1.7635.72 ▼4.05
Add New Post /wp-admin/post-new.php1,535 ▼118.59 ▲0.54623.29 ▼30.8367.97 ▲0.01
Media Library /wp-admin/upload.php1,397 ▲34.21 ▼0.01101.19 ▼5.8243.17 ▼2.58

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpematico-polylang/wpematico_polylang.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Polylang Lenguages list in context.)
You can take inspiration from this readme.txt

wpematico-polylang/wpematico_polylang.php 92% from 13 tests

The entry point to "WPeMatico Polylang" version 1.1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpematico-polylang.php" instead of "wpematico_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 plugin331 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP576248275
PO File19947
CSS1049

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.39
Average class complexity10.80
▷ Minimum class complexity4.00
▷ Maximum class complexity22.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods2090.91%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.01KB6.12KB▼ 59.23%
screenshot-2.png171.72KB57.66KB▼ 66.42%