83% wp-super-subdomains

Code Review | WP Super Subdomains

WordPress plugin WP Super Subdomains scored83%from 54 tests.

About plugin

  • Plugin page: wp-super-subdomains
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: Sep 19, 2016
  • Number of updates: 12
  • Update frequency: every 23.5 days
  • Top authors: mcjambi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /6,889 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.33ms] Passed 4 tests

Server-side resources used by WP Super Subdomains
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.19 ▼2.10
Dashboard /wp-admin3.36 ▲0.0247.07 ▼14.16
Posts /wp-admin/edit.php3.48 ▲0.1247.06 ▲0.54
Add New Post /wp-admin/post-new.php5.94 ▲0.0683.97 ▼25.61
Media Library /wp-admin/upload.php3.29 ▲0.0643.20 ▲5.28
Super subdomains /wp-admin/options-general.php?page=setup-subdomain3.2534.15

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Super Subdomains
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.45 ▲0.101.63 ▲0.0740.24 ▼6.89
Dashboard /wp-admin2,193 ▲185.48 ▼0.1482.09 ▼15.4537.77 ▼8.20
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0234.69 ▼2.2731.82 ▼5.28
Add New Post /wp-admin/post-new.php1,531 ▲323.21 ▲0.10723.25 ▲61.0666.00 ▲13.23
Media Library /wp-admin/upload.php1,401 ▲14.20 ▲0.11107.54 ▼3.5446.28 ▼0.26
Super subdomains /wp-admin/options-general.php?page=setup-subdomain9161.9921.3040.71

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-super-subdomains/supersubdomain.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-super-subdomains/supersubdomain.php 85% from 13 tests

"WP Super Subdomains" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-super-subdomains.php" instead of "supersubdomain.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected356 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP174139356

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity33.00
▷ Minimum class complexity6.00
▷ Maximum class complexity60.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png42.35KB25.23KB▼ 40.42%