84% concise-antispam

Code Review | Concise Antispam

WordPress plugin Concise Antispam scored84%from 54 tests.

About plugin

  • Plugin page: concise-antispam
  • Plugin version: 1.0.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.0
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Nov 1, 2022
  • Number of updates: 30
  • Update frequency: every 27.0 days
  • Top authors: concisestudio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,198 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Concise Antispam
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.79 ▼3.11
Dashboard /wp-admin3.32 ▲0.0245.56 ▲1.83
Posts /wp-admin/edit.php3.37 ▲0.0146.23 ▼1.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.84 ▼1.09
Media Library /wp-admin/upload.php3.24 ▲0.0137.42 ▲3.54

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: 1 new table, 6 new options
New tables
wp_antispam_token
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Concise Antispam
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.32 ▼1.262.60 ▲0.4244.85 ▼2.61
Dashboard /wp-admin2,209 ▲235.88 ▲0.9397.14 ▼18.3839.83 ▼2.52
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0137.13 ▼1.6632.38 ▼2.44
Add New Post /wp-admin/post-new.php1,538 ▲422.95 ▼0.15655.25 ▲3.2955.58 ▲7.16
Media Library /wp-admin/upload.php1,388 ▲94.25 ▼0.04109.15 ▲4.3146.39 ▲1.75

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/concise-antispam/concise-antispam.php: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
4 plugin tags: antispam, spam, anti spam, anti-spam

concise-antispam/concise-antispam.php Passed 13 tests

The main PHP file in "Concise Antispam" ver. 1.0.13 adds more information about the plugin and also serves as the entry point for this plugin
16 characters long description:
Concise Antispam

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected275 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28818275

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods850.00%
▷ Protected methods00.00%
▷ Private methods850.00%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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