79% formidable-anti-spam

Code Review | Formidable Anti-Spam

WordPress plugin Formidable Anti-Spam scored 79% from 54 tests.

About plugin

  • Plugin page: formidable-anti-spam
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.0
  • WordPress version: 6.3.1
  • First release: Oct 1, 2014
  • Latest release: Oct 1, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: thomstark (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 1,354 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.15ms] Passed 4 tests

Analyzing server-side resources used by Formidable Anti-Spam
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.27 ▲0.66
Dashboard /wp-admin3.35 ▲0.0544.03 ▼4.00
Posts /wp-admin/edit.php3.46 ▲0.1046.70 ▼0.36
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.76 ▼0.91
Media Library /wp-admin/upload.php3.27 ▲0.0435.16 ▲1.60

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
frmantispam_settings
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Formidable Anti-Spam
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.16 ▼1.221.94 ▲0.3243.04 ▲1.62
Dashboard /wp-admin2,206 ▲545.84 ▲0.1894.69 ▼10.8540.14 ▼0.76
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0335.13 ▼7.5734.48 ▼4.28
Add New Post /wp-admin/post-new.php1,542 ▲918.57 ▼4.82591.66 ▼40.6352.50 ▼6.02
Media Library /wp-admin/upload.php1,382 ▼34.36 ▲0.0699.68 ▼2.9541.16 ▼2.78

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • frmantispam_settings
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/formidable-anti-spam/includes/global-settings.php
    • > /wp-content/plugins/formidable-anti-spam/includes/form-options.php
    • > /wp-content/plugins/formidable-anti-spam/classes/FrmAntiSpamActions.php
    • > /wp-content/plugins/formidable-anti-spam/classes/FrmAntiSpamFormOptions.php
    • > /wp-content/plugins/formidable-anti-spam/classes/FrmAntiSpamGlobalSettingsForm.php
    • > /wp-content/plugins/formidable-anti-spam/classes/FrmAntiSpamGlobalSettings.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/formidable-anti-spam/classes/FrmAntiSpamGlobalSettings.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: bot, anti-spam, form, formidable pro, capcha...

formidable-anti-spam/formidable-anti-spam.php Passed 13 tests

The entry point to "Formidable Anti-Spam" version 1.0 is a PHP file that has certain tags in its header comment area
89 characters long description:
A lightweight Formidable Pro anti-spam add-on that requires no interaction with the user.

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
Everything looks great! No dangerous files found in this plugin314 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP709314

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity7.40
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1045.45%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin