73% fullworks-anti-spam

Code Review | Anti Spam by Fullworks

WordPress plugin Anti Spam by Fullworks scored73%from 54 tests.

About plugin

  • Plugin page: fullworks-anti-spam
  • Plugin version: 1.3.11
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Nov 27, 2019
  • Latest release: Nov 13, 2023
  • Number of updates: 64
  • Update frequency: every 22.6 days
  • Top authors: fullworks (98.44%)alanfuller (3.13%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /23,374 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.14MB] [CPU: ▲28.57ms] 50% from 4 tests

Server-side resources used by Anti Spam by Fullworks
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,925.41ms on /wp-admin/options-general.php?page=fullworks-anti-spam-settings)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.14MB on /wp-admin/admin.php?page=fullworks-anti-spam-settings)
PageMemory (MB)CPU Time (ms)
Home /9.00 ▲5.5367.80 ▲28.70
Dashboard /wp-admin9.02 ▲5.7176.06 ▲22.92
Posts /wp-admin/edit.php9.02 ▲5.6684.21 ▲36.07
Add New Post /wp-admin/post-new.php9.55 ▲3.66120.89 ▲26.60
Media Library /wp-admin/upload.php9.02 ▲5.7970.46 ▲38.97
Anti Spam /wp-admin/options-general.php?page=fullworks-anti-spam-settings9.021,925.41
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.0261.28
Settings /wp-admin/admin.php?page=fullworks-anti-spam-settings9.0261.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 267 new files
Database: 1 new table, 11 new options
New tables
wp_fwantispam_log
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
fullworks-anti-spam
fs_active_plugins
fs_accounts
can_compress_scripts
fs_debug_mode
fullworks_anti_spam_db_version
...

Browser metrics Passed 4 tests

Anti Spam by Fullworks: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14013.79 ▼0.577.57 ▲5.7629.95 ▼12.77
Dashboard /wp-admin2,218 ▲385.66 ▲0.0095.01 ▼5.4144.43 ▼0.17
Posts /wp-admin/edit.php2,124 ▲242.01 ▲0.0440.22 ▲2.5641.65 ▲8.91
Add New Post /wp-admin/post-new.php1,536 ▲1022.99 ▼0.18689.97 ▼1.4451.49 ▼1.48
Media Library /wp-admin/upload.php1,423 ▲234.13 ▼0.0895.59 ▼9.4742.30 ▼2.30
Anti Spam /wp-admin/options-general.php?page=fullworks-anti-spam-settings1,0532.0133.0557.67
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0881.6523.4528.98
Settings /wp-admin/admin.php?page=fullworks-anti-spam-settings1,0471.9733.5245.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/fullworks-anti-spam/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • fs_accounts
    • can_compress_scripts
    • fs_active_plugins
    • fs_debug_mode
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Fullworks_Anti_Spam\\Admin\\Admin_Pages' not found in wp-content/plugins/fullworks-anti-spam/admin/class-admin-settings.php:35
    • > PHP Fatal error
      require_once(): Failed opening required 'FULLWORKS_ANTI_SPAM_PLUGIN_DIR/vendor/gamajo/template-loader/class-gamajo-template-loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/fullworks-anti-spam/control/class-template-loader.php on line 38
    • > PHP Warning
      require_once(FULLWORKS_ANTI_SPAM_PLUGIN_DIR/vendor/gamajo/template-loader/class-gamajo-template-loader.php): failed to open stream: No such file or directory in wp-content/plugins/fullworks-anti-spam/control/class-template-loader.php on line 38
    • > PHP Warning
      Use of undefined constant FULLWORKS_ANTI_SPAM_PLUGIN_DIR - assumed 'FULLWORKS_ANTI_SPAM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/fullworks-anti-spam/control/class-template-loader.php on line 38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: spam, spam firewall, anti-spam, spam protection, antispam...

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

"Anti Spam by Fullworks" version 1.3.11's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
Anti Spam by Fullworks providing protection for your website

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected39,266 lines of code in 207 files:
LanguageFilesBlank linesComment linesLines of code
PHP1478,50218,77435,275
Sass39546923,348
JavaScript43883221
JSON100213
CSS1422142
XML2275067

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity65.71
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces9
Interfaces1
Traits0
Classes71
▷ Abstract classes22.82%
▷ Concrete classes6997.18%
▷ Final classes00.00%
Methods1,403
▷ Static methods22716.18%
▷ Public methods98370.06%
▷ Protected methods201.43%
▷ Private methods40028.51%
Functions107
▷ Named functions10396.26%
▷ Anonymous functions43.74%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.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
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/freemius/wordpress-sdk/assets/img/fullworks-anti-spam.png14.47KB5.86KB▼ 59.52%
admin/images/brand/light-anti-spam-75h.png4.30KB3.08KB▼ 28.50%