94% yg-subdomain

Code Review | yg-Subdomains

WordPress plugin yg-Subdomains scored 94% from 54 tests.

About plugin

  • Plugin page: yg-subdomain
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.6
  • WordPress version: 5.8.1
  • First release: May 23, 2013
  • Latest release: Aug 30, 2013
  • Number of updates: 3
  • Update frequency: every 33.0 days
  • Top authors: DragonOfDev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,207 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.30MB] [CPU: ▼156.79ms] Passed 4 tests

An overview of server-side resources used by yg-Subdomains
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1754.89 ▲31.82
Dashboard /wp-admin3.11 ▲0.0550.01 ▲3.84
Posts /wp-admin/edit.php3.16 ▲0.0545.12 ▼2.48
Add New Post /wp-admin/post-new.php4.09 ▼1.3542.22 ▼631.56
Media Library /wp-admin/upload.php3.05 ▲0.0436.06 ▲3.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for yg-Subdomains
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.77 ▲0.197.54 ▼2.3752.10 ▼0.66
Dashboard /wp-admin2,973 ▲365.85 ▼0.07143.23 ▼13.41121.52 ▲2.00
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0067.72 ▲1.8093.44 ▼2.99
Add New Post /wp-admin/post-new.php1,723 ▼1,98317.00 ▼1.98394.54 ▼94.62119.83 ▲9.70
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.02151.10 ▼8.25127.25 ▲0.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yg-subdomain/yg-subdomain.php:78

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (The review edition page)
Please take inspiration from this readme.txt

yg-subdomain/yg-subdomain.php Passed 13 tests

The primary PHP file in "yg-Subdomains" version 0.1 is used by WordPress to initiate all plugin functionality
41 characters long description:
Use selecttive selected post as subdomain

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin159 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13337159

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png64.55KB20.49KB▼ 68.26%