84% easy-inputs

Code Review | Easy Inputs

WordPress plugin Easy Inputs scored84%from 54 tests.

About plugin

  • Plugin page: easy-inputs
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Oct 17, 2017
  • Latest release: Jul 22, 2018
  • Number of updates: 12
  • Update frequency: every 23.2 days
  • Top authors: DragonFlyEye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /857 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Easy Inputs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.63 ▼6.93
Dashboard /wp-admin3.31 ▲0.0145.42 ▼3.34
Posts /wp-admin/edit.php3.36 ▲0.0145.32 ▼3.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.65 ▼12.74
Media Library /wp-admin/upload.php3.23 ▲0.0135.32 ▲1.88

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Inputs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.141.66 ▼0.1040.22 ▼5.08
Dashboard /wp-admin2,203 ▲244.86 ▼0.02103.13 ▲0.2640.46 ▼7.48
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0736.22 ▼3.5133.94 ▲1.75
Add New Post /wp-admin/post-new.php1,542 ▲2818.47 ▲0.77609.88 ▼63.6352.63 ▲1.02
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0394.84 ▼7.2440.64 ▼1.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/easy-inputs/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/easy-inputs/tests/bootstrap.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/easy-inputs/tests/test-form-class.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/easy-inputs/tests/test-input-class.php:12
    • > PHP Warning
      require_once(wp-content/plugins/easy-inputs/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/easy-inputs/tests/bootstrap.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/easy-inputs/tests/test-easy-inputs.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: html, forms, settings, metadata, inputs

easy-inputs/easy-inputs.php Passed 13 tests

The main file in "Easy Inputs" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
61 characters long description:
Error-free HTML form and input template engine for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected10,694 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
HTML168631125,616
CSS6109241,748
JavaScript132704191,506
SVG744869
PHP7118576762
Bourne Shell121799
XML32046
Markdown19035
JSON10013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods70
▷ Static methods22.86%
▷ Public methods6491.43%
▷ Protected methods00.00%
▷ Private methods68.57%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
13 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
docs/api/images/apple-touch-icon.png8.16KB3.82KB▼ 53.23%
docs/api/images/apple-touch-icon-114x114.png27.67KB10.58KB▼ 61.78%
docs/api/images/icon-trait-13x13.png0.33KB0.23KB▼ 30.59%
docs/api/images/icon-interface-13x13.png0.30KB0.19KB▼ 37.99%
docs/api/images/iviewer/iviewer.rotate_right.png1.45KB1.46KB0.00%