78% f4-improvements

Code Review | F4 Improvements

WordPress plugin F4 Improvements scored78%from 54 tests.

About plugin

  • Plugin page: f4-improvements
  • Plugin version: 1.8.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Oct 6, 2023
  • Number of updates: 23
  • Update frequency: every 53.1 days
  • Top authors: faktorvier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,724 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼0.19ms] Passed 4 tests

An overview of server-side resources used by F4 Improvements
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0845.66 ▲6.18
Dashboard /wp-admin3.52 ▲0.2251.90 ▲4.55
Posts /wp-admin/edit.php3.56 ▲0.2154.33 ▲2.75
Add New Post /wp-admin/post-new.php6.10 ▲0.2190.42 ▼13.51
Media Library /wp-admin/upload.php3.44 ▲0.2144.76 ▲5.44
Improvements /wp-admin/options-general.php?page=f4-improvements3.5253.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for F4 Improvements
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.63 ▼1.121.79 ▲0.1342.33 ▼2.82
Dashboard /wp-admin2,236 ▲485.90 ▲1.00105.52 ▼2.3839.90 ▼1.61
Posts /wp-admin/edit.php2,119 ▲302.00 ▲0.0233.20 ▼8.8435.04 ▲1.13
Add New Post /wp-admin/post-new.php1,562 ▲4323.06 ▼0.07627.40 ▼51.3350.47 ▼2.14
Media Library /wp-admin/upload.php1,412 ▲244.19 ▼0.0199.06 ▼10.7843.64 ▼5.44
Improvements /wp-admin/options-general.php?page=f4-improvements1,3801.8626.0128.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/f4-improvements/modules/Core/Options/views/admin-options.php
    • > /wp-content/plugins/f4-improvements/modules/Core/Options/views/field-select.php
    • > /wp-content/plugins/f4-improvements/modules/Core/Options/views/field-checkboxes.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-select.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-select.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-select.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-text.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-textarea.php:6
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-select.php on line 12
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-select.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-page.php:7
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-select.php on line 9
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/f4-improvements/modules/Core/Options/views/field-checkbox.php on line 10

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: frontend, security, enhancements, media, wp rocket...

f4-improvements/f4-improvements.php 92% from 13 tests

The main file in "F4 Improvements" v. 1.8.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.0")

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
Everything looks great! No dangerous files found in this plugin1,961 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP215141,1191,961

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.92
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods120
▷ Static methods120100.00%
▷ Public methods120100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants17
▷ Global constants17100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/made-with-love-by-f4.png1.83KB1.95KB0.00%