94% html5-placeholder-polyfill

Code Review | HTML5 Placeholder Polyfill

WordPress plugin HTML5 Placeholder Polyfill scored 94% from 54 tests.

About plugin

  • Plugin page: html5-placeholder...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.2
  • WordPress version: 5.8.1
  • First release: Aug 15, 2013
  • Latest release: Jun 21, 2021
  • Number of updates: 27
  • Update frequency: every 106.2 days
  • Top authors: McGuive7 (81.48%)aaronbmm (22.22%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 3,260 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼143.59ms] Passed 4 tests

Analyzing server-side resources used by HTML5 Placeholder Polyfill
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.59 ▲22.23
Dashboard /wp-admin3.06 ▲0.0136.48 ▼5.34
Posts /wp-admin/edit.php3.12 ▲0.0147.20 ▲5.31
Add New Post /wp-admin/post-new.php5.42 ▼0.0189.42 ▼575.88
Media Library /wp-admin/upload.php3.01 ▲0.0135.82 ▲1.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for HTML5 Placeholder Polyfill
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲23816.58 ▲1.1311.33 ▲2.5549.02 ▼2.93
Dashboard /wp-admin2,982 ▲485.92 ▼0.02139.32 ▼16.08118.65 ▲5.69
Posts /wp-admin/edit.php2,748 ▲92.69 ▲0.0170.40 ▼2.9699.68 ▲7.01
Add New Post /wp-admin/post-new.php1,500 ▼018.85 ▲0.36387.47 ▲17.45120.39 ▼0.43
Media Library /wp-admin/upload.php1,813 ▲65.04 ▲0.04144.98 ▼9.65129.73 ▼5.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html5-placeholder-polyfill/html5-placeholder-polyfill.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
9 plugin tags: internet explorer, form, html5, jquery, input...

html5-placeholder-polyfill/html5-placeholder-polyfill.php Passed 13 tests

The main file in "HTML5 Placeholder Polyfill" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
77 characters long description:
Mimics HTML5 placeholder behavior in browsers that don't support it natively.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin157 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22318147
PHP181610

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin