78% js-antispam

Code Review | Inpsyde AntiSpam

WordPress plugin Inpsyde AntiSpam scored78%from 54 tests.

About plugin

  • Plugin page: js-antispam
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2007
  • Latest release: Aug 20, 2015
  • Number of updates: 57
  • Update frequency: every 58.8 days
  • Top authors: Bueltge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /7,806 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.10ms] Passed 4 tests

A check of server-side resources used by Inpsyde AntiSpam
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.50 ▼2.46
Dashboard /wp-admin3.38 ▲0.0846.79 ▼11.33
Posts /wp-admin/edit.php3.50 ▲0.1448.62 ▼0.83
Add New Post /wp-admin/post-new.php5.96 ▲0.0887.37 ▼1.77
Media Library /wp-admin/upload.php3.31 ▲0.0840.47 ▲5.41
Antispam /wp-admin/options-general.php?page=inpsyde-antispam-page3.2530.19

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Inpsyde AntiSpam
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.27 ▼1.091.71 ▼0.2242.71 ▼5.49
Dashboard /wp-admin2,210 ▲224.83 ▼0.03102.81 ▼14.1839.53 ▼4.17
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0440.70 ▲3.1133.75 ▼4.05
Add New Post /wp-admin/post-new.php1,536 ▲1723.11 ▼0.19592.44 ▼112.5953.89 ▼5.51
Media Library /wp-admin/upload.php1,389 ▲14.27 ▲0.0798.99 ▼14.4844.69 ▼4.49
Antispam /wp-admin/options-general.php?page=inpsyde-antispam-page8952.1723.2927.39

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=inpsyde-antispam-page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=inpsyde-antispam-page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Inpsyde\\Antispam\\is_admin() in wp-content/plugins/js-antispam/antispam.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Inpsyde\\Antispam\\is_admin() in wp-content/plugins/js-antispam/antispam.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

js-antispam/inpsyde-antispam.php 85% from 13 tests

The main PHP script in "Inpsyde AntiSpam" version 2.1.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("js-antispam.php" instead of "inpsyde-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
Success! There were no dangerous files found in this plugin435 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP375160316
PO File1235066
Markdown117038
JavaScript471315

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1260.00%
▷ Anonymous functions840.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin