10% nix-anti-spam-light

Code Review | NIX Anti-Spam Light

WordPress plugin NIX Anti-Spam Light scored10%from 54 tests.

About plugin

  • Plugin page: nix-anti-spam-light
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2013
  • Latest release: Oct 29, 2014
  • Number of updates: 10
  • Update frequency: every 56.9 days
  • Top authors: nixsolutions (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,895 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/nix-anti-spam-light/nix-antispam-light.php+37
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.84ms] Passed 4 tests

Server-side resources used by NIX Anti-Spam Light
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.12 ▼4.00
Dashboard /wp-admin3.32 ▲0.0144.59 ▼4.11
Posts /wp-admin/edit.php3.37 ▲0.0149.17 ▲3.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.95 ▼2.45
Media Library /wp-admin/upload.php3.24 ▲0.0137.15 ▲4.15

Server storage [IO: ▲0.01MB] [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: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
nix_antispam_options

Browser metrics Passed 4 tests

Checking browser requirements for NIX Anti-Spam Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.35 ▼1.401.68 ▼0.4540.96 ▼2.69
Dashboard /wp-admin2,204 ▲165.84 ▲0.96105.52 ▼1.5036.34 ▼7.91
Posts /wp-admin/edit.php2,096 ▲41.97 ▼0.0341.41 ▼2.7735.81 ▼4.58
Add New Post /wp-admin/post-new.php1,545 ▲3118.14 ▲0.41600.28 ▲3.3867.71 ▲18.61
Media Library /wp-admin/upload.php1,386 ▲14.23 ▲0.0595.35 ▼8.8442.73 ▼1.82
NIX Anti-Spam Light /wp-admin/nix-antispam-light.php260.440.0813.71

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

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/nix-anti-spam-light/template/admin-messages.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/nix-anti-spam-light/nix-antispam-light.php:20
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/nix-anti-spam-light/template/admin-messages.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nix-anti-spam-light/template/main-options-page.php:3
    • > PHP Notice
      Undefined variable: messages in wp-content/plugins/nix-anti-spam-light/template/admin-messages.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/nix-anti-spam-light/template/about-us.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/nix-antispam-light.php
    • > Network (severe)
    wp-admin/nix-antispam-light.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: spam, no captcha, comments, anti-spam bot, anti-spam...

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

The primary PHP file in "NIX Anti-Spam Light" version 0.0.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("nix-anti-spam-light.php" instead of "nix-antispam-light.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin287 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP64323246
CSS16021
JavaScript12020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.50
▷ Minimum class complexity4.00
▷ Maximum class complexity13.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods1285.71%
▷ Protected methods17.14%
▷ Private methods17.14%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin