10% wp-subdomains-revisited

Code Review | WP Subdomains (Revisited)

WordPress plugin WP Subdomains (Revisited) scored10%from 54 tests.

About plugin

  • Plugin page: wp-subdomains-rev...
  • Plugin version: 0.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2012
  • Latest release: Feb 26, 2013
  • Number of updates: 45
  • Update frequency: every 18.3 days
  • Top authors: selnomeria (80%)lontongcorp (22.22%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /13,513 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/subdomains.php+87
    Methods with the same name as their class will not be constructors in a future version of PHP; WpsPlugin has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼59.90ms] Passed 4 tests

Analyzing server-side resources used by WP Subdomains (Revisited)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.94 ▼34.10
Dashboard /wp-admin2.12 ▼1.237.65 ▼59.53
Posts /wp-admin/edit.php2.12 ▼1.245.76 ▼46.07
Add New Post /wp-admin/post-new.php2.12 ▼3.776.99 ▼99.91
Media Library /wp-admin/upload.php2.12 ▼1.125.39 ▼30.94
Pages /wp-admin/admin.php?page=wps_pages2.126.14
Settings /wp-admin/admin.php?page=wps_settings2.127.16
Categories /wp-admin/admin.php?page=wps_categories2.127.60
WP Subdomains /wp-admin/admin.php?page=wps2.126.29

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 26 new files
Database: 1 new table, 7 new options
New tables
wp_category_subdomains
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
wps_version

Browser metrics Passed 4 tests

Checking browser requirements for WP Subdomains (Revisited)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.73 ▲0.591.96 ▲0.2642.46 ▲1.23
Dashboard /wp-admin2,217 ▲405.59 ▲0.0087.24 ▼5.7277.48 ▲22.50
Posts /wp-admin/edit.php2,134 ▲342.00 ▼0.0033.96 ▼2.7131.99 ▼3.48
Add New Post /wp-admin/post-new.php1,554 ▲1917.77 ▼5.27751.72 ▲91.3460.92 ▲4.85
Media Library /wp-admin/upload.php1,437 ▲344.13 ▼0.1499.45 ▼7.2290.26 ▲41.69
Pages /wp-admin/admin.php?page=wps_pages1,0262.0326.7541.00
Settings /wp-admin/admin.php?page=wps_settings1,1551.7124.1834.16
Categories /wp-admin/admin.php?page=wps_categories1,0322.0225.0524.37
WP Subdomains /wp-admin/admin.php?page=wps1,0912.0223.0727.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/subdomains.php+87
    Methods with the same name as their class will not be constructors in a future version of PHP; WpsPlugin has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/subdomains.php+87
    Methods with the same name as their class will not be constructors in a future version of PHP; WpsPlugin has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/plugin/classes.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; WpsSubDomains has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/plugin/classes.php+240
    Methods with the same name as their class will not be constructors in a future version of PHP; WpsSubDomain has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/plugin/classes.php+417
    Methods with the same name as their class will not be constructors in a future version of PHP; WpsSubDomainCat has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/plugin/classes.php+580
    Methods with the same name as their class will not be constructors in a future version of PHP; WpsSubDomainPage has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/plugin/classes.php+660
    Methods with the same name as their class will not be constructors in a future version of PHP; WpsSubDomainAuthor has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-content/plugins/wp-subdomains-revisited/plugin/actions.php+64
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WpsSitelistWidget::init() should not be called statically
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > User deprecated in wp-includes/functions.php+5453
    Function register_widget_control is deprecated since version 2.8.0! Use wp_register_widget_control() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WpsCategoriesWidget::init() should not be called statically
  • 44 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/admin.php?page=wps_categories
    • > Notice in wp-content/plugins/wp-subdomains-revisited/plugin/admin.php+277
    Undefined index: subdomains

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-subdomains-revisited/subdomains.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-subdomains-revisited/widgets/sitelist.php:144
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-subdomains-revisited/widgets/categories.php:132

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)
Please take a look at the following user-side issues
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wps
    • > Network (severe)
    http://www.lontongcorp.com/wp-content/plugins/simple-lazyload/blank_1x1.gif - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (WP Subdomains -> Settings), #2 (Category Interface), #3 (Pages Editor widget interface)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-subdomains-revisited === )
You can look at the official readme.txt

wp-subdomains-revisited/subdomains.php 92% from 13 tests

The main PHP script in "WP Subdomains (Revisited)" version 0.9.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-subdomains-revisited.php" instead of "subdomains.php")

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
Good job! No executable or dangerous file extensions detected2,247 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP115263002,040
PO File198123207

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.62
▷ Minimum class complexity4.00
▷ Maximum class complexity32.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions58
▷ Named functions58100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.71KB18.01KB▼ 8.65%
views/Authors.png6.80KB6.63KB▼ 2.56%
views/Folders.png3.26KB3.30KB0.00%
views/Pages.png6.34KB6.06KB▼ 4.36%
views/more.png1.77KB1.69KB▼ 4.09%