84% statsfc-results

Code Review | StatsFC Results

WordPress plugin StatsFC Results scored84%from 54 tests.

About plugin

  • Plugin page: statsfc-results
  • 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 17, 2013
  • Latest release: Jun 22, 2023
  • Number of updates: 73
  • Update frequency: every 51.4 days
  • Top authors: willjw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /5,485 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.73ms] Passed 4 tests

An overview of server-side resources used by StatsFC Results
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.55 ▼1.31
Dashboard /wp-admin3.37 ▲0.0744.85 ▼4.15
Posts /wp-admin/edit.php3.42 ▲0.0744.22 ▲3.13
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.50 ▼6.17
Media Library /wp-admin/upload.php3.30 ▲0.0735.95 ▲0.70

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_statsfc_results
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for StatsFC Results
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.231.68 ▼0.0343.81 ▼3.34
Dashboard /wp-admin2,206 ▲244.88 ▼1.09103.76 ▼1.5739.95 ▼2.62
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0333.74 ▼2.0932.72 ▼1.26
Add New Post /wp-admin/post-new.php1,514 ▼2117.57 ▼5.68684.89 ▲0.1066.78 ▲7.90
Media Library /wp-admin/upload.php1,385 ▼34.27 ▲0.0599.96 ▼8.5743.04 ▼2.25

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
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_statsfc_results
    • can_compress_scripts

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/statsfc-results/statsfc-results.php:35

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

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

"StatsFC Results" version 3.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
15 characters long description:
StatsFC Results

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
Everything looks great! No dangerous files found in this plugin674 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13958290
JavaScript1585276
CSS1200108

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected