84% statsfc-poll

Code Review | StatsFC Poll

WordPress plugin StatsFC Poll scored84%from 54 tests.

About plugin

  • Plugin page: statsfc-poll
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 19, 2015
  • Latest release: Jun 22, 2023
  • Number of updates: 38
  • Update frequency: every 81.0 days
  • Top authors: willjw (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,799 total downloads

Benchmarks

Plugin footprint 83% from 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 gracefully, with no errors

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

A check of server-side resources used by StatsFC Poll
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.20 ▼4.29
Dashboard /wp-admin3.31 ▲0.0143.96 ▼3.29
Posts /wp-admin/edit.php3.36 ▲0.0147.33 ▼1.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.92 ▼12.50
Media Library /wp-admin/upload.php3.24 ▲0.0131.79 ▼4.75

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for StatsFC Poll
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.19 ▼1.081.75 ▼0.1938.41 ▼8.65
Dashboard /wp-admin2,209 ▲244.87 ▼0.04110.71 ▲6.4143.81 ▲0.34
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0140.50 ▼1.0335.59 ▲1.18
Add New Post /wp-admin/post-new.php1,533 ▲523.20 ▲4.79593.84 ▼37.8856.32 ▲4.24
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0293.06 ▼6.5942.42 ▼0.03

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_statsfc_poll
    • db_upgraded

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 | 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: Class 'WP_Widget' not found in wp-content/plugins/statsfc-poll/statsfc-poll.php:35

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

statsfc-poll/statsfc-poll.php Passed 13 tests

This is the main PHP file of "StatsFC Poll" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
12 characters long description:
StatsFC Poll

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected454 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1749252
PHP13756129
CSS113073

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin