10% fv-antispam

Code Review | FV Antispam

WordPress plugin FV Antispam scored10%from 54 tests.

About plugin

  • Plugin page: fv-antispam
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Sep 10, 2010
  • Latest release: Aug 22, 2023
  • Number of updates: 77
  • Update frequency: every 61.4 days
  • Top authors: FolioVision (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /52,950 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.23MB] [CPU: ▼51.01ms] Passed 4 tests

This is a short check of server-side resources used by FV Antispam
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.717.67 ▼32.38
Dashboard /wp-admin2.78 ▼0.5310.87 ▼39.81
Posts /wp-admin/edit.php2.78 ▼0.5812.13 ▼43.29
Add New Post /wp-admin/post-new.php2.78 ▼3.119.26 ▼88.57
Media Library /wp-admin/upload.php2.78 ▼0.458.44 ▼30.06
FV Antispam /wp-admin/options-general.php?page=fv-antispam2.789.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
fv_antispam
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
fv_antispam_ver

Browser metrics Passed 4 tests

An overview of browser requirements for FV Antispam
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.73 ▲0.831.62 ▼0.0340.07 ▼5.39
Dashboard /wp-admin2,196 ▲165.56 ▼0.1389.33 ▼1.3741.22 ▲0.11
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0339.84 ▼0.8437.55 ▲0.21
Add New Post /wp-admin/post-new.php1,531 ▲323.23 ▼0.17626.34 ▼47.1447.74 ▼23.45
Media Library /wp-admin/upload.php1,407 ▲44.18 ▼0.04100.19 ▼4.1146.96 ▲2.28
FV Antispam /wp-admin/options-general.php?page=fv-antispam1,0912.1442.8326.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: comment_status_links
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • fv_antispam_ver
    • widget_recent-comments
    • can_compress_scripts
    • fv_antispam

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: comment_status_links
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: disable_pingback_notify
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: pingback_notify_email
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: dashboard_count
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: already_commented
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: always_allowed
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: my_own_styling
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: ignore_pings
    • > GET request to /wp-admin/options-general.php?page=fv-antispam
    • > Notice in wp-content/plugins/fv-antispam/fv-antispam.php+1499
    Undefined index: cronjob_writeout

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined index: FV_Antispam in wp-content/plugins/fv-antispam/include/extra.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/fv-antispam/view/admin_advanced.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function func__get_plugin_option() on null in wp-content/plugins/fv-antispam/include/extra.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fv-antispam/view/admin_stats.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fv-antispam/view/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fv-antispam/view/admin_basic.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fv-antispam/view/admin_filled_in.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (FV Antispam settings), #2 (Enhanced comments and pingback counters (showing comments/pingbacks))
The official readme.txt is a good inspiration

fv-antispam/fv-antispam.php Passed 13 tests

The main PHP file in "FV Antispam" ver. 2.7 adds more information about the plugin and also serves as the entry point for this plugin
140 characters long description:
Powerful and simple antispam plugin. Puts all the spambot comments directly into trash and let's other plugins (Akismet) deal with the rest.

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 plugin2,761 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP96682352,314
PO File1014546432
Markdown113015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity134.00
▷ Minimum class complexity1.00
▷ Maximum class complexity331.00
Average method complexity5.69
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods85
▷ Static methods89.41%
▷ Public methods85100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png146.60KB48.49KB▼ 66.93%
screenshot-2.png50.65KB19.53KB▼ 61.44%