84% infoset

Code Review | Infoset

WordPress plugin Infoset scored84%from 54 tests.

About plugin

  • Plugin page: infoset
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.6
  • WordPress version: 6.3.1
  • First release: Feb 17, 2021
  • Latest release: Feb 17, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: infoset (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /463 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.50ms] Passed 4 tests

An overview of server-side resources used by Infoset
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.17 ▼3.66
Dashboard /wp-admin3.37 ▲0.0765.38 ▲12.17
Posts /wp-admin/edit.php3.49 ▲0.1348.34 ▼0.69
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.97 ▼9.68
Media Library /wp-admin/upload.php3.30 ▲0.0743.36 ▲8.04
Infoset /wp-admin/options-general.php?page=infoset3.2432.20

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Infoset
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.45 ▲0.252.81 ▲0.8043.12 ▼6.15
Dashboard /wp-admin2,201 ▲215.65 ▲0.0394.55 ▲2.3643.29 ▲4.25
Posts /wp-admin/edit.php2,106 ▲61.97 ▼0.0436.13 ▼2.9837.42 ▼0.51
Add New Post /wp-admin/post-new.php1,693 ▲16724.73 ▲1.77633.69 ▼75.4661.89 ▲7.40
Media Library /wp-admin/upload.php1,403 ▼04.21 ▲0.01100.49 ▼2.5749.48 ▲1.56
Infoset /wp-admin/options-general.php?page=infoset8862.1826.7739.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=infoset
    • > Notice in wp-content/plugins/infoset/infoset.php+470
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === infoset === )
You can take inspiration from this readme.txt

infoset/infoset.php Passed 13 tests

Analyzing the main PHP file in "Infoset" version 1.0
43 characters long description:
Official Infoset chat widget for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin465 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP17614417
CSS10045
Markdown1002
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.33
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods1961.29%
▷ Protected methods00.00%
▷ Private methods1238.71%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
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
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/oauth-login-20210118@3x.png4.15KB4.41KB0.00%
assets/oauth-login-20210118.png1.71KB1.76KB0.00%
assets/oauth-login-20210118@2x.png2.91KB3.08KB0.00%