94% add-or-remove-www

Code Review | Add or Remove Www

WordPress plugin Add or Remove Www scored 94% from 54 tests.

About plugin

  • Plugin page: add-or-remove-www
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 5.9.2
  • First release: Jan 22, 2015
  • Latest release: Dec 12, 2015
  • Number of updates: 8
  • Update frequency: every 47.5 days
  • Top authors: stubgo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 6,371 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.02MB] [CPU: ▼295.21ms] Passed 4 tests

Server-side resources used by Add or Remove Www
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0156.53 ▼0.88
Dashboard /wp-admin3.41 ▲0.0134.28 ▼1.82
Posts /wp-admin/edit.php3.65 ▲0.0136.45 ▼1.23
Add New Post /wp-admin/post-new.php6.88 ▼0.0891.40 ▼1,176.91
Media Library /wp-admin/upload.php3.30 ▲0.0024.89 ▲0.71
Add or Remove Www /wp-admin/options-general.php?page=add-or-remove-www3.2723.66

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Add or Remove Www
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲2915.10 ▼0.236.65 ▲0.112.24 ▲0.07
Dashboard /wp-admin2,900 ▲406.08 ▼0.06113.84 ▼9.14163.56 ▲3.87
Posts /wp-admin/edit.php2,696 ▲23.24 ▲0.0062.43 ▼5.86139.83 ▼10.17
Add New Post /wp-admin/post-new.php1,667 ▲616.42 ▲0.35410.53 ▼14.71155.04 ▼61.01
Media Library /wp-admin/upload.php1,700 ▲25.61 ▲0.09159.76 ▲15.73213.78 ▼45.69
Add or Remove Www /wp-admin/options-general.php?page=add-or-remove-www1,0632.3762.89134.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-or-remove-www/settings-page.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-or-remove-www/settings-functions.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-or-remove-www/settings-functions.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: domains, subdomains, www, configuration, domain...

add-or-remove-www/add-or-remove-www.php 92% from 13 tests

Analyzing the main PHP file in "Add or Remove Www" version 1.01
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 186 characters long)

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
Success! There were no dangerous files found in this plugin105 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31346105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin