68% domain-sharding

Code Review | Domain Sharding

WordPress plugin Domain Sharding scored68%from 54 tests.

About plugin

  • Plugin page: domain-sharding
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 5, 2014
  • Latest release: Mar 5, 2018
  • Number of updates: 24
  • Update frequency: every 62.1 days
  • Top authors: SultanICQ (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

60+ active /4,736 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.96MB] [CPU: ▼37.83ms] Passed 4 tests

Analyzing server-side resources used by Domain Sharding
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.16 ▼2.82
Dashboard /wp-admin3.00 ▼0.3523.59 ▼35.60
Posts /wp-admin/edit.php3.00 ▼0.3624.29 ▼22.62
Add New Post /wp-admin/post-new.php3.00 ▼2.8922.63 ▼80.73
Media Library /wp-admin/upload.php3.00 ▼0.2321.96 ▼12.36

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Domain Sharding
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.29 ▼1.091.74 ▼0.0343.57 ▼3.93
Dashboard /wp-admin2,214 ▲234.84 ▼0.06101.51 ▼15.9740.35 ▼2.78
Posts /wp-admin/edit.php2,099 ▲132.05 ▲0.0435.19 ▼2.5432.97 ▼3.08
Add New Post /wp-admin/post-new.php1,524 ▼917.40 ▼5.73663.45 ▼24.4948.40 ▼8.69
Media Library /wp-admin/upload.php1,399 ▲84.24 ▲0.04102.33 ▼1.5143.69 ▼5.31
Domain Sharding /wp-admin/domain-sharding.php260.440.1216.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > 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.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/domain-sharding/domain-sharding.php:76

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/domain-sharding.php
    • > Network (severe)
    wp-admin/domain-sharding.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: cdn, speed, optimization, domain sharding, wpo

domain-sharding/domain-sharding.php 92% from 13 tests

The main PHP file in "Domain Sharding" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin423 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28710423

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity55.00
▷ Minimum class complexity55.00
▷ Maximum class complexity55.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin