78% page-as-subdomain-lite

Code Review | Page As Subdomain Lite

WordPress plugin Page As Subdomain Lite scored78%from 54 tests.

About plugin

  • Plugin page: page-as-subdomain...
  • Plugin version: 2.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2015
  • Latest release: Jun 1, 2023
  • Number of updates: 70
  • Update frequency: every 39.7 days
  • Top authors: zinger252 (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

600+ active /29,636 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.14MB] [CPU: ▼12.66ms] Passed 4 tests

This is a short check of server-side resources used by Page As Subdomain Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6617.37 ▼24.22
Dashboard /wp-admin3.35 ▲0.0447.24 ▼9.75
Posts /wp-admin/edit.php3.40 ▲0.0450.93 ▲0.22
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.86 ▼10.79
Media Library /wp-admin/upload.php3.27 ▲0.0430.36 ▼5.88
Subdomains /wp-admin/edit.php?post_type=page&page=page_subdomain3.2533.58

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Page As Subdomain Lite: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.72 ▲0.452.11 ▲0.2143.49 ▼2.79
Dashboard /wp-admin2,199 ▲245.51 ▼0.0987.73 ▼15.8238.63 ▼5.06
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0341.56 ▲1.1635.93 ▼0.90
Add New Post /wp-admin/post-new.php1,529 ▲323.24 ▲0.36586.72 ▼132.1865.71 ▲9.69
Media Library /wp-admin/upload.php1,398 ▼24.16 ▼0.0396.66 ▼10.4839.98 ▼4.72
Subdomains /wp-admin/edit.php?post_type=page&page=page_subdomain1,5449.17296.7277.37

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/page-as-subdomain-lite/inc/moreaddons.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/page-as-subdomain-lite/page.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: page, seo, pages, subdomain

page-as-subdomain-lite/page.php 85% from 13 tests

The main PHP file in "Page As Subdomain Lite" ver. 2.5.0 adds more information about the plugin and also serves as the entry point for this plugin
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: Please rename the main PHP file in this plugin to the plugin slug ("page-as-subdomain-lite.php" instead of "page.php")

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
There were no executable files found in this plugin232 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP513319232

PHP code Passed 2 tests

An overview 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.36
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/premium.png7.66KB0.00KB▼ 100.00%