68% input-scanner

Code Review | Input Scanner

WordPress plugin Input Scanner scored68%from 54 tests.

About plugin

  • Plugin page: input-scanner
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2021
  • Latest release: Dec 25, 2021
  • Number of updates: 4
  • Update frequency: every 19.5 days
  • Top authors: aigenseer (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,238 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▲18.03ms] Passed 4 tests

This is a short check of server-side resources used by Input Scanner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2067.41 ▲22.43
Dashboard /wp-admin3.38 ▲0.0768.35 ▲17.05
Posts /wp-admin/edit.php3.49 ▲0.1372.12 ▲21.33
Add New Post /wp-admin/post-new.php5.98 ▲0.09106.80 ▲13.08
Media Library /wp-admin/upload.php3.30 ▲0.0759.44 ▲20.66

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: 1 new table, 6 new options
New tables
wp_inputscanner_settings
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Input Scanner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12216.22 ▲1.599.15 ▲7.1740.44 ▼8.87
Dashboard /wp-admin2,223 ▲466.71 ▲1.1595.11 ▲2.9240.00 ▼4.07
Posts /wp-admin/edit.php2,132 ▲293.84 ▲1.8151.25 ▲14.3938.27 ▲3.31
Add New Post /wp-admin/post-new.php1,565 ▲3919.65 ▲2.22678.26 ▲17.8237.90 ▼22.13
Media Library /wp-admin/upload.php1,435 ▲356.40 ▲2.19106.62 ▲7.0746.74 ▲5.16

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
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_inputscanner_settings
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/input-scanner/include/httpsWarning.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/input-scanner/include/pluginsettingsform.php on line 22
    • > PHP Notice
      Undefined variable: inputScanner_formValues in wp-content/plugins/input-scanner/include/pluginsettingsform.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to a member function fetchPost() on null in wp-content/plugins/input-scanner/include/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/input-scanner/class/tabs.class.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/input-scanner/include/pluginsettingsform.php:105

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

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: input, wordpress, barcode, scanner, plugin...

input-scanner/index.php 77% from 13 tests

"Input Scanner" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "5.2")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.2.4" instead of "7.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("input-scanner.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin6,573 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS239046,114
PHP649109444
JavaScript203215

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity20.50
▷ Minimum class complexity7.00
▷ Maximum class complexity34.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions11
▷ Named functions327.27%
▷ Anonymous functions872.73%
Constants3
▷ Global constants3100.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 are no PNG files in this plugin