89% simply-polls

Code Review | Simply Polls

WordPress plugin Simply Polls scored89%from 54 tests.

About plugin

  • Plugin page: simply-polls
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5
  • WordPress version: 6.3.1
  • First release: Apr 28, 2016
  • Latest release: Apr 28, 2016
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: achilles21 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /2,781 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.46ms] Passed 4 tests

This is a short check of server-side resources used by Simply Polls
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1549.18 ▲6.16
Dashboard /wp-admin3.45 ▲0.1048.97 ▼17.05
Posts /wp-admin/edit.php3.56 ▲0.2052.87 ▼0.87
Add New Post /wp-admin/post-new.php6.03 ▲0.1493.54 ▼13.84
Media Library /wp-admin/upload.php3.37 ▲0.1438.82 ▲5.94

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: 3 new tables, 6 new options
New tables
wp_plg_sp_answs
wp_plg_sp_ip
wp_plg_sp_polls
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simply Polls
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9713.30 ▼1.101.97 ▲0.2641.24 ▼3.47
Dashboard /wp-admin2,237 ▲314.82 ▼0.07103.89 ▼3.1640.12 ▼5.97
Posts /wp-admin/edit.php2,119 ▲192.05 ▲0.0142.39 ▲2.9734.51 ▼1.42
Add New Post /wp-admin/post-new.php1,557 ▲3123.14 ▲5.55661.73 ▲10.2558.58 ▼5.39
Media Library /wp-admin/upload.php1,410 ▲104.14 ▼0.14100.97 ▼6.2142.18 ▼6.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin - All Poll), #2 (Admin - Edit Poll), #3 (Admin - Results), #4 (Poll - Poll results on page and poll in sidebar), #5 (Poll - Poll in page)
The official readme.txt might help

simply-polls/alex-simply-polls.php 85% from 13 tests

The main file in "Simply Polls" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simply-polls.php" instead of "alex-simply-polls.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 detected932 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP311966588
PO File26474183
JavaScript2172288
CSS27073

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.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
5 PNG files occupy 0.30MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png51.15KB15.70KB▼ 69.30%
screenshot-3.png43.17KB11.86KB▼ 72.52%
screenshot-4.png91.75KB26.95KB▼ 70.63%
screenshot-1.png54.09KB17.74KB▼ 67.19%
screenshot-5.png65.32KB20.63KB▼ 68.42%