84% pegapoll

Code Review | PegaPoll

WordPress plugin PegaPoll scored84%from 54 tests.

About plugin

  • Plugin page: pegapoll
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 6.3.1
  • First release: Jan 17, 2022
  • Latest release: Mar 8, 2022
  • Number of updates: 6
  • Update frequency: every 9.5 days
  • Top authors: lowcage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,580 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.70ms] Passed 4 tests

An overview of server-side resources used by PegaPoll
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.20 ▼2.24
Dashboard /wp-admin3.48 ▲0.1857.60 ▲4.98
Posts /wp-admin/edit.php3.60 ▲0.2456.25 ▲5.27
Add New Post /wp-admin/post-new.php6.08 ▲0.2092.60 ▼14.82
Media Library /wp-admin/upload.php3.41 ▲0.1846.08 ▲9.57

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

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

Browser metrics Passed 4 tests

A check of browser resources used by PegaPoll
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,008 ▲24713.41 ▼1.069.34 ▲7.5636.97 ▼6.45
Dashboard /wp-admin2,299 ▲1225.53 ▼0.1390.44 ▼1.6443.08 ▲1.46
Posts /wp-admin/edit.php2,207 ▲1072.14 ▲0.1239.05 ▼0.7233.32 ▼3.22
Add New Post /wp-admin/post-new.php6,383 ▲4,85527.51 ▲4.32953.02 ▲269.2939.56 ▼24.07
Media Library /wp-admin/upload.php1,505 ▲1054.40 ▲0.22101.57 ▼9.0047.60 ▲2.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pegapoll/public/public.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pegapoll/pegapoll.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pegapoll/admin/admin.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pegapoll/includes/settings/settings.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: embedded, pegapoll, iframe

pegapoll/pegapoll.php Passed 13 tests

The principal PHP file in "PegaPoll" v. 1.0.2 is loaded by WordPress automatically on each request
92 characters long description:
PegaPoll is an official PegaPoll plugin, which can embed PegaPolls easily using their URL's.

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
Success! There were no dangerous files found in this plugin1,671 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27097726
PHP4111193599
CSS22623101
PO File14242100
SVG20282
JSON10063

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin