84% statsfc-form

Code Review | StatsFC Form

WordPress plugin StatsFC Form scored84%from 54 tests.

About plugin

  • Plugin page: statsfc-form
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 14, 2013
  • Latest release: Jun 22, 2023
  • Number of updates: 75
  • Update frequency: every 50.0 days
  • Top authors: willjw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,002 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.97ms] Passed 4 tests

Analyzing server-side resources used by StatsFC Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.90 ▼2.80
Dashboard /wp-admin3.36 ▲0.0548.19 ▲0.14
Posts /wp-admin/edit.php3.41 ▲0.0547.42 ▼2.81
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.40 ▼14.40
Media Library /wp-admin/upload.php3.28 ▲0.0537.84 ▲4.94

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_statsfc_form
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by StatsFC Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.47 ▲0.101.83 ▼0.2344.24 ▼4.17
Dashboard /wp-admin2,206 ▲185.86 ▲0.96111.50 ▼4.6143.01 ▲0.27
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0137.98 ▼0.3834.84 ▲1.56
Add New Post /wp-admin/post-new.php1,542 ▲918.33 ▼4.99631.92 ▼10.4750.85 ▼8.66
Media Library /wp-admin/upload.php1,385 ▲34.18 ▼0.0794.73 ▼4.6242.32 ▼1.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_statsfc_form
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/statsfc-form/statsfc-form.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

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

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

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
Everything looks great! No dangerous files found in this plugin476 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13756217
JavaScript1455181
CSS114078

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin