84% statsfc-score-predictor

Code Review | StatsFC Score Predictor

WordPress plugin StatsFC Score Predictor scored84%from 54 tests.

About plugin

  • Plugin page: statsfc-score-pre...
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 16, 2013
  • Latest release: Jun 22, 2023
  • Number of updates: 89
  • Update frequency: every 41.8 days
  • Top authors: willjw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /5,463 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
Install script ran successfully

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

This is a short check of server-side resources used by StatsFC Score Predictor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.13 ▼1.54
Dashboard /wp-admin3.36 ▲0.0145.75 ▼14.80
Posts /wp-admin/edit.php3.41 ▲0.0546.16 ▼2.06
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.73 ▼12.73
Media Library /wp-admin/upload.php3.28 ▲0.0533.01 ▲0.25

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_statsfc_scorepredictor
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by StatsFC Score Predictor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.34 ▼1.041.77 ▼0.0144.76 ▲3.64
Dashboard /wp-admin2,203 ▲185.81 ▼0.05100.49 ▼1.2138.32 ▼5.74
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0539.27 ▲4.5734.35 ▼1.96
Add New Post /wp-admin/post-new.php1,523 ▲423.18 ▼0.08680.35 ▲53.1265.93 ▲14.53
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.04105.58 ▲1.2846.55 ▲3.22

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_statsfc_scorepredictor
    • widget_recent-posts

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/statsfc-score-predictor/statsfc-score-predictor.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

statsfc-score-predictor/statsfc-score-predictor.php Passed 13 tests

The primary PHP file in "StatsFC Score Predictor" version 3.1.0 is used by WordPress to initiate all plugin functionality
23 characters long description:
StatsFC Score Predictor

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin617 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16011305
PHP13956214
CSS116098

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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 are no PNG files in this plugin