77% post-as-subdomain-free

Code Review | Post As Subdomain Lite

WordPress plugin Post As Subdomain Lite scored77%from 54 tests.

About plugin

  • Plugin page: post-as-subdomain...
  • Plugin version: 2...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 24, 2017
  • Latest release: May 25, 2023
  • Number of updates: 19
  • Update frequency: every 108.9 days
  • Top authors: zinger252 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /2,577 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.17MB] [CPU: ▼6.39ms] Passed 4 tests

An overview of server-side resources used by Post As Subdomain Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7013.94 ▼22.44
Dashboard /wp-admin3.31 ▲0.0146.30 ▼2.74
Posts /wp-admin/edit.php3.37 ▲0.0151.70 ▲4.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.68 ▼1.47
Media Library /wp-admin/upload.php3.24 ▲0.0133.59 ▲1.08
Subdomains /wp-admin/edit.php?page=post_subdomain3.2231.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post As Subdomain Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.31 ▼0.874.02 ▲2.4040.50 ▲0.93
Dashboard /wp-admin2,207 ▲195.80 ▲0.9494.24 ▼25.1539.54 ▼4.71
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0139.43 ▼1.3235.10 ▼0.84
Add New Post /wp-admin/post-new.php1,545 ▲1018.47 ▼4.92627.12 ▲19.1549.56 ▼4.41
Media Library /wp-admin/upload.php1,395 ▲44.22 ▼0.0093.93 ▼11.8343.84 ▼0.40
Subdomains /wp-admin/edit.php?page=post_subdomain1,5179.48287.3376.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-as-subdomain-free/post.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?page=post_subdomain
    • > Network (severe)
    wp-content/plugins/post-as-subdomain-free//img%20/search-engine-concept_23-21474972551444995226.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?page=post_subdomain
    • > Network (severe)
    wp-content/plugins/post-as-subdomain-free//img%20/cat-sub.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?page=post_subdomain
    • > Network (severe)
    wp-content/plugins/post-as-subdomain-free//img%20/5901495271797.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?page=post_subdomain
    • > Network (severe)
    wp-content/plugins/post-as-subdomain-free//img%20/success1408873-screenshot640.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?page=post_subdomain
    • > Network (severe)
    wp-content/plugins/post-as-subdomain-free//img%20/Cover1505242234.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?page=post_subdomain
    • > Network (severe)
    wp-content/plugins/post-as-subdomain-free//img%20/coming-soon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: seo, post, subdomain, posts

post-as-subdomain-free/post.php 77% from 13 tests

The primary PHP file in "Post As Subdomain Lite" version 2... is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-as-subdomain-free.php" instead of "post.php")
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "2...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin193 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111916193

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.51MB with 0.31MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/coming-soon.png176.88KB76.72KB▼ 56.62%
img/Cover1505242234.png120.22KB43.58KB▼ 63.75%
img/5901495271797.png224.00KB80.39KB▼ 64.11%