88% js-antispam

Code Review | Inpsyde AntiSpam

WordPress plugin Inpsyde AntiSpam scored 88% 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: 5.9.2
  • 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

80+ active / 7,354 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Inpsyde AntiSpam
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0755.27 ▲4.02
Dashboard /wp-admin3.50 ▲0.0834.82 ▲1.09
Posts /wp-admin/edit.php3.72 ▲0.0838.15 ▼0.46
Add New Post /wp-admin/post-new.php6.96 ▼0.0293.47 ▼1,209.90
Media Library /wp-admin/upload.php3.37 ▲0.0726.00 ▲0.57
Antispam /wp-admin/options-general.php?page=inpsyde-antispam-page3.3222.62

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Inpsyde AntiSpam
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,803 ▲4915.85 ▼0.067.39 ▲0.812.64 ▼0.03
Dashboard /wp-admin2,897 ▲436.21 ▲0.02117.36 ▼28.69162.09 ▼10.36
Posts /wp-admin/edit.php2,696 ▲23.24 ▼0.0066.45 ▲3.29138.25 ▼4.52
Add New Post /wp-admin/post-new.php1,714 ▼3820.79 ▼0.09459.79 ▲14.40158.70 ▼1.69
Media Library /wp-admin/upload.php1,703 ▲85.53 ▲0.00146.74 ▲2.90188.94 ▼1.02
Antispam /wp-admin/options-general.php?page=inpsyde-antispam-page1,1462.4055.41126.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=inpsyde-antispam-page
    • > User deprecated in wp-includes/functions.php+5326
    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+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > 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 shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

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

The entry point to "Inpsyde AntiSpam" version 2.1.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("js-antispam.php" instead of "inpsyde-antispam.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin435 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP375160316
PO File1235066
Markdown117038
JavaScript471315

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin