68% hide-inactive-sites

Code Review | Hide Inactive Sites

WordPress plugin Hide Inactive Sites scored 68% from 54 tests.

About plugin

  • Plugin page: hide-inactive-sites
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.3
  • WordPress version: 6.3.1
  • First release: Feb 10, 2012
  • Latest release: Aug 31, 2015
  • Number of updates: 22
  • Update frequency: every 59.0 days
  • Top authors: ericjuden (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,482 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.94MB] [CPU: ▼34.01ms] Passed 4 tests

This is a short check of server-side resources used by Hide Inactive Sites
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.21 ▲0.48
Dashboard /wp-admin3.00 ▼0.3023.53 ▼30.55
Posts /wp-admin/edit.php3.00 ▼0.3627.83 ▼20.85
Add New Post /wp-admin/post-new.php3.00 ▼2.8923.83 ▼69.91
Media Library /wp-admin/upload.php3.00 ▼0.2323.08 ▼14.72
Hide Inactive Sites /wp-admin/options-general.php?page=hide-inactive-sites-options3.0025.11

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Hide Inactive Sites: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.181.54 ▼0.3738.17 ▼14.24
Dashboard /wp-admin2,210 ▲225.85 ▲0.9493.17 ▼13.5938.48 ▼9.08
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0438.14 ▲3.2735.22 ▼1.48
Add New Post /wp-admin/post-new.php1,523 ▲623.25 ▲5.48636.19 ▼19.6457.46 ▲3.98
Media Library /wp-admin/upload.php1,392 ▲44.28 ▲0.1194.50 ▼0.2841.41 ▼1.46
Hide Inactive Sites /wp-admin/options-general.php?page=hide-inactive-sites-options1,0882.0622.6341.11

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
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > 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.
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=hide-inactive-sites-options
    • > 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.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=hide-inactive-sites-options
    • > Notice in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php+306
    Undefined index: update_frequency
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=hide-inactive-sites-options
    • > Notice in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php+320
    Undefined index: inactivity_threshold
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=hide-inactive-sites-options
    • > Notice in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php+334
    Undefined index: inactivity_warning_threshold
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=hide-inactive-sites-options
    • > Notice in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php+349
    Undefined index: site_visibility
    • > GET request to /wp-admin/options-general.php?page=hide-inactive-sites-options
    • > Notice in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php+359
    Undefined index: archive_site
    • > GET request to /wp-admin/options-general.php?page=hide-inactive-sites-options
    • > Notice in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php+361
    Undefined index: delete_site
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=hide-inactive-sites-options
    • > Notice in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php+382
    Undefined index: min_posts

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php on line 12
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/hide-inactive-sites/hide-inactive-sites.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (The Network Admin dashboard screen. Each of the options can be added on to using the hooks in the plugin.)
You can look at the official readme.txt

hide-inactive-sites/hide-inactive-sites.php Passed 13 tests

The entry point to "Hide Inactive Sites" version 1.2.2 is a PHP file that has certain tags in its header comment area
89 characters long description:
Changes visibility of a blog after it has had no activity for a specified amount of time.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin403 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17335403

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.94KB10.89KB▼ 48.02%