94% embed-poll-for-all

Code Review | Embed Poll For All

WordPress plugin Embed Poll For All scored 94% from 54 tests.

About plugin

  • Plugin page: embed-poll-for-all
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 5.8.1
  • First release: Oct 28, 2019
  • Latest release: Oct 28, 2019
  • Number of updates: 7
  • Update frequency: every 0.2 days
  • Top authors: softry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 413 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Embed Poll For All
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.27 ▲14.47
Dashboard /wp-admin3.07 ▲0.0144.36 ▲2.34
Posts /wp-admin/edit.php3.12 ▲0.0145.96 ▲0.27
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.73 ▼568.51
Media Library /wp-admin/upload.php3.01 ▲0.0137.32 ▲4.36

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Embed Poll For All
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.41 ▲0.819.89 ▼0.3548.58 ▲2.91
Dashboard /wp-admin2,966 ▲326.04 ▲0.08157.70 ▲5.38110.26 ▲1.53
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0274.24 ▲6.7486.44 ▲3.08
Add New Post /wp-admin/post-new.php1,615 ▼6821.48 ▲2.96297.57 ▼93.33101.35 ▼8.24
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.01180.11 ▲35.78117.17 ▼1.47

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
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-poll-for-all/pollforall-oembed.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: embed, vote, oembed, poll

embed-poll-for-all/pollforall-oembed.php 92% from 13 tests

The primary PHP file in "Embed Poll For All" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("embed-poll-for-all.php" instead of "pollforall-oembed.php")

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
Success! There were no dangerous files found in this plugin5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1295

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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
2 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png89.00KB27.64KB▼ 68.94%
assets/icon-128x128.png12.61KB3.43KB▼ 72.79%