84% statsfc-live

Code Review | StatsFC Live

WordPress plugin StatsFC Live scored84%from 54 tests.

About plugin

  • Plugin page: statsfc-live
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2013
  • Latest release: Jun 22, 2023
  • Number of updates: 77
  • Update frequency: every 48.3 days
  • Top authors: willjw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /6,863 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.34ms] Passed 4 tests

This is a short check of server-side resources used by StatsFC Live
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.04 ▼2.51
Dashboard /wp-admin3.36 ▲0.0151.89 ▼10.48
Posts /wp-admin/edit.php3.41 ▲0.0547.18 ▲0.28
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.38 ▼12.63
Media Library /wp-admin/upload.php3.28 ▲0.0538.19 ▲1.34

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_statsfc_live
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for StatsFC Live
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4214.34 ▼0.022.03 ▲0.2643.78 ▼3.30
Dashboard /wp-admin2,198 ▲185.63 ▲0.0291.23 ▼0.8441.29 ▼2.02
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0240.23 ▲1.6736.52 ▼3.98
Add New Post /wp-admin/post-new.php1,526 ▼023.00 ▲0.16660.02 ▼27.0562.75 ▲2.45
Media Library /wp-admin/upload.php1,394 ▼64.23 ▲0.1097.14 ▼34.4344.07 ▼7.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_statsfc_live
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 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-live/statsfc-live.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

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

The main PHP script in "StatsFC Live" version 3.0.1 is automatically included on every request by WordPress
12 characters long description:
StatsFC Live

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
There were no executable files found in this plugin548 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1505229
PHP13958214
CSS1190105

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.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
There were not PNG files found in your plugin