84% add-or-remove-www

Code Review | Add or Remove Www

WordPress plugin Add or Remove Www scored84%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: 6.3.1
  • 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

200+ active /6,770 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.79ms] Passed 4 tests

A check of server-side resources used by Add or Remove Www
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.01 ▼4.62
Dashboard /wp-admin3.33 ▼0.0247.50 ▼12.66
Posts /wp-admin/edit.php3.38 ▲0.0252.89 ▲3.87
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.51 ▼15.61
Media Library /wp-admin/upload.php3.25 ▲0.0237.32 ▼2.28
Add or Remove Www /wp-admin/options-general.php?page=add-or-remove-www3.2231.20

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, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Add or Remove Www: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.38 ▲0.021.80 ▼0.3142.16 ▼2.08
Dashboard /wp-admin2,201 ▲215.65 ▲0.0297.98 ▲12.9444.53 ▲1.44
Posts /wp-admin/edit.php2,109 ▲92.03 ▲0.0944.39 ▲8.9135.59 ▼5.95
Add New Post /wp-admin/post-new.php1,531 ▲523.08 ▼0.02681.02 ▲51.1650.73 ▲3.05
Media Library /wp-admin/upload.php1,409 ▲64.20 ▼0.0097.92 ▼3.0141.80 ▼2.92
Add or Remove Www /wp-admin/options-general.php?page=add-or-remove-www8242.0127.2932.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-or-remove-www/settings-page.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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: subdomain, options, domain, www, configuration...

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

This is the main PHP file of "Add or Remove Www" version 1.01, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 186 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
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 is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin