84% oopspam-anti-spam

Code Review | OOPSpam Anti-Spam

WordPress plugin OOPSpam Anti-Spam scored84%from 54 tests.

About plugin

  • Plugin page: oopspam-anti-spam
  • Plugin version: 1.1.55
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.4
  • WordPress version: 6.3.1
  • First release: Aug 5, 2019
  • Latest release: Nov 22, 2023
  • Number of updates: 150
  • Update frequency: every 10.5 days
  • Top authors: oopspam (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /28,329 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.81MB] [CPU: ▲0.99ms] Passed 4 tests

Analyzing server-side resources used by OOPSpam Anti-Spam
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5845.24 ▲2.32
Dashboard /wp-admin4.18 ▲0.8853.14 ▲4.82
Posts /wp-admin/edit.php4.22 ▲0.8651.92 ▲0.14
Add New Post /wp-admin/post-new.php6.90 ▲1.0187.82 ▼1.54
Media Library /wp-admin/upload.php4.14 ▲0.9136.45 ▲3.04
Form Ham Entries /wp-admin/admin.php?page=wp_oopspam_frm_ham_entries4.0138.95
Settings /wp-admin/admin.php?page=wp_oopspam_settings_page4.0138.21
Form Spam Entries /wp-admin/admin.php?page=wp_oopspam_frm_spam_entries4.0136.99

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: 2 new tables, 8 new options
New tables
wp_oopspam_frm_ham_entries
wp_oopspam_frm_spam_entries
New WordPress options
widget_recent-comments
oopspam_db_version
can_compress_scripts
oopspamantispam_settings
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by OOPSpam Anti-Spam
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10814.74 ▲0.031.89 ▲0.1641.13 ▼5.05
Dashboard /wp-admin2,251 ▲715.55 ▼0.2497.19 ▲6.5342.04 ▲1.49
Posts /wp-admin/edit.php2,156 ▲532.03 ▲0.0142.83 ▲2.6137.39 ▲0.97
Add New Post /wp-admin/post-new.php1,562 ▲3323.29 ▼0.22657.78 ▲44.3552.58 ▼5.37
Media Library /wp-admin/upload.php1,455 ▲554.46 ▲0.2397.85 ▼14.8241.58 ▼4.29
Form Ham Entries /wp-admin/admin.php?page=wp_oopspam_frm_ham_entries1,2391.7132.2433.01
Settings /wp-admin/admin.php?page=wp_oopspam_settings_page4,0772.0543.1049.06
Form Spam Entries /wp-admin/admin.php?page=wp_oopspam_frm_spam_entries1,2391.7426.9530.93

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oopspam-anti-spam/integration/Mailpoet.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/oopspam-anti-spam/integration/GravityForms.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/oopspam-anti-spam/include/UI/display-ham-entries.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/oopspam-anti-spam/include/UI/display-ham-entries.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/oopspam-anti-spam/integration/BricksForm.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/oopspam-anti-spam/integration/WPRegistration.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/oopspam-anti-spam/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oopspam-anti-spam/integration/Kadence.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oopspam-anti-spam/integration/ElementorForm.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/oopspam-anti-spam/include/UI/display-spam-entries.php on line 4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: Please take inspiration from this readme.txt

oopspam-anti-spam/oopspam-antispam.php 92% from 13 tests

The main file in "OOPSpam Anti-Spam" v. 1.1.55 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("oopspam-anti-spam.php" instead of "oopspam-antispam.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected6,440 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP329605834,642
JavaScript2117161,224
CSS33833556
XML10018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity15.88
▷ Minimum class complexity2.00
▷ Maximum class complexity28.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods69
▷ Static methods1521.74%
▷ Public methods6797.10%
▷ Protected methods22.90%
▷ Private methods00.00%
Functions121
▷ Named functions11897.52%
▷ Anonymous functions32.48%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/libs/chosen-sprite.png0.63KB0.88KB0.00%
include/libs/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%