90% duplicate-content-addon-for-polylang

Code Review | Polylang Duplicate Content Addon

WordPress plugin Polylang Duplicate Content Addon scored 90% from 54 tests.

About plugin

  • Plugin page: duplicate-content...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5
  • WordPress version: 5.8.1
  • First release: Jan 4, 2020
  • Latest release: Aug 17, 2020
  • Number of updates: 10
  • Update frequency: every 22.7 days
  • Top authors: khushwantsidhu (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active / 8,787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼174.10ms] Passed 4 tests

A check of server-side resources used by Polylang Duplicate Content Addon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1242.26 ▲8.72
Dashboard /wp-admin3.20 ▲0.1449.83 ▲0.63
Posts /wp-admin/edit.php3.31 ▲0.2049.54 ▼2.83
Add New Post /wp-admin/post-new.php5.55 ▲0.1290.55 ▼693.53
Media Library /wp-admin/upload.php3.14 ▲0.1436.80 ▼0.66

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 4 new options
New WordPress options
dupcap-ratingDiv
dupcap-v
dupcap-installDate
dupcap-type

Browser metrics Passed 4 tests

Checking browser requirements for Polylang Duplicate Content Addon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲11315.95 ▲0.3912.12 ▲0.0151.66 ▼1.68
Dashboard /wp-admin2,973 ▲395.95 ▼0.01150.02 ▼9.48125.65 ▲1.53
Posts /wp-admin/edit.php2,745 ▲62.72 ▲0.0064.88 ▼3.34102.54 ▲10.95
Add New Post /wp-admin/post-new.php1,687 ▲418.77 ▼0.02400.21 ▼2.22114.57 ▼5.22
Media Library /wp-admin/upload.php1,813 ▲65.05 ▲0.03168.00 ▲5.78122.06 ▼7.93

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: 4 options
    • dupcap-v
    • dupcap-installDate
    • dupcap-ratingDiv
    • dupcap-type

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: clone, polylang, duplicate, language, translation

duplicate-content-addon-for-polylang/duplicate-content-addon-for-polylang.php 92% from 13 tests

The principal PHP file in "Polylang Duplicate Content Addon" v. 1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • 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

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
Good job! No executable or dangerous file extensions detected607 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2199106558
CSS10028
JavaScript26021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity40.00
▷ Minimum class complexity7.00
▷ Maximum class complexity73.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods24
▷ Static methods312.50%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/dupcap-logo.png4.76KB2.36KB▼ 50.40%