83% load-your-site-url-in-any-page

Code Review | Duplicate Front Page

WordPress plugin Duplicate Front Page scored83%from 54 tests.

About plugin

  • Plugin page: load-your-site-ur...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2019
  • Latest release: Sep 18, 2020
  • Number of updates: 13
  • Update frequency: every 27.9 days
  • Top authors: chiragrathod103 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /678 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.61MB] [CPU: ▼25.61ms] Passed 4 tests

This is a short check of server-side resources used by Duplicate Front Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0835.33 ▼6.80
Dashboard /wp-admin3.38 ▲0.0443.88 ▼17.19
Posts /wp-admin/edit.php3.50 ▲0.1445.56 ▼0.19
Add New Post /wp-admin/post-new.php3.23 ▼2.6635.79 ▼78.24
Media Library /wp-admin/upload.php3.31 ▲0.0834.99 ▲3.39

Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • The plugin illegally modified 1 file (0.64KB) outside of "wp-content/plugins/load-your-site-url-in-any-page/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/laup_page_template.php
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Duplicate Front Page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18513.53 ▼0.829.25 ▲7.6139.14 ▼4.34
Dashboard /wp-admin2,216 ▲365.69 ▲0.1693.61 ▲4.1541.89 ▲4.99
Posts /wp-admin/edit.php2,121 ▲212.03 ▲0.0240.60 ▲0.3135.77 ▲1.57
Add New Post /wp-admin/post-new.php1,551 ▲1418.31 ▲0.19640.24 ▲33.6964.37 ▲1.21
Media Library /wp-admin/upload.php1,412 ▲124.22 ▲0.0394.93 ▼4.6842.10 ▼0.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/load-your-site-url-in-any-page/public/partials/load-page-or-post-by-url-public-display.php
    • > /wp-content/plugins/load-your-site-url-in-any-page/admin/partials/load-page-or-post-by-url-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
8 plugin tags: duplicate template, duplicate front page, duplicate, iframe, copy template...

load-your-site-url-in-any-page/load-page-or-post-by-url.php 85% from 13 tests

This is the main PHP file of "Duplicate Front Page" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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: It is recommended to name the main PHP file as the plugin slug ("load-your-site-url-in-any-page.php" instead of "load-page-or-post-by-url.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
Everything looks great! No dangerous files found in this plugin374 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12149585337
CSS21830
JavaScript2007

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.26MB with 0.18MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
laup-steps.png145.81KB46.75KB▼ 67.94%
screenshot-1.png118.56KB38.09KB▼ 67.87%