10% subnet-info

Code Review | subnetinfo

WordPress plugin subnetinfo scored10%from 54 tests.

About plugin

  • Plugin page: subnet-info
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.4
  • WordPress version: 6.3.1
  • First release: May 26, 2018
  • Latest release: Nov 8, 2019
  • Number of updates: 5
  • Update frequency: every 106.2 days
  • Top authors: crisvangeel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /615 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/subnet-info/inc/class_subnetinfo_shortcode.php+359
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.77MB] [CPU: ▼52.50ms] Passed 4 tests

Server-side resources used by subnetinfo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.246.24 ▼44.07
Dashboard /wp-admin2.24 ▼1.076.06 ▼44.53
Posts /wp-admin/edit.php2.24 ▼1.128.59 ▼39.41
Add New Post /wp-admin/post-new.php2.24 ▼3.656.91 ▼81.97
Media Library /wp-admin/upload.php2.24 ▼0.995.95 ▼31.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for subnetinfo
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.78 ▲0.142.66 ▲0.6646.70 ▼2.95
Dashboard /wp-admin2,206 ▲304.88 ▼0.98104.12 ▼11.2438.20 ▼7.01
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0033.95 ▼5.3930.57 ▼7.16
Add New Post /wp-admin/post-new.php1,514 ▼2317.84 ▼5.24662.70 ▼21.2151.65 ▲1.81
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0195.80 ▼13.1842.35 ▼5.44

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
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/subnet-info/inc/class_subnetinfo_shortcode.php+359
    Array and string offset access syntax with curly braces is deprecated
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: calculator, ipv4, subnet, ip, subnetinfo...

subnet-info/subnetinfo.php 77% from 13 tests

"subnetinfo" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("subnet-info.php" instead of "subnetinfo.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin326 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP412169314
CSS11012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity47.50
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity24.25
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin