68% oneofones-nospam

Code Review | OneOfOne's NoSpam

WordPress plugin OneOfOne's NoSpam scored 68% from 54 tests.

About plugin

  • Plugin page: oneofones-nospam
  • Plugin version: v0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9
  • WordPress version: 5.8.1
  • First release: Apr 4, 2014
  • Latest release: Apr 14, 2014
  • Number of updates: 24
  • Update frequency: every 0.4 days
  • Top authors: OneOfOne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 689 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.04MB] [CPU: ▼179.83ms] Passed 4 tests

Server-side resources used by OneOfOne's NoSpam
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.57 ▼0.1615.71 ▼6.24
Dashboard /wp-admin2.62 ▼0.4443.57 ▼1.97
Posts /wp-admin/edit.php2.62 ▼0.5019.51 ▼25.20
Add New Post /wp-admin/post-new.php2.62 ▼2.8217.69 ▼664.41
Media Library /wp-admin/upload.php2.62 ▼0.4014.56 ▼23.45
OneOfOne's NoSpam /wp-admin/options-general.php?page=ooo-nospam-admin2.6216.84

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
ooo-nospam-count

Browser metrics Passed 4 tests

Checking browser requirements for OneOfOne's NoSpam
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.05 ▲0.2810.08 ▼1.5359.56 ▲12.59
Dashboard /wp-admin2,975 ▲415.91 ▼0.04146.37 ▼9.14119.92 ▲5.71
Posts /wp-admin/edit.php2,744 ▲52.71 ▲0.0064.57 ▼1.35101.80 ▲8.98
Add New Post /wp-admin/post-new.php1,618 ▲1421.92 ▲3.42270.03 ▼89.39108.69 ▼5.62
Media Library /wp-admin/upload.php1,812 ▲25.04 ▲0.03144.99 ▼0.09116.73 ▼4.73
OneOfOne's NoSpam /wp-admin/options-general.php?page=ooo-nospam-admin1,1402.0855.13102.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/oneofones-nospam/ooo-nospam.php+130
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 1 option in the database
    • ooo-nospam-count

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=ooo-nospam-admin
    • > Notice in wp-content/plugins/oneofones-nospam/ooo-nospam.php+130
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=ooo-nospam-admin
    • > Notice in wp-content/plugins/oneofones-nospam/ooo-nospam.php+131
    Undefined index: max_urls

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/oneofones-nospam/ooo-nospam.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === oneofones-nospam === )
Please take inspiration from this readme.txt

oneofones-nospam/ooo-nospam.php 85% from 13 tests

"OneOfOne's NoSpam" version v0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "v0.8")
  • Main file name: Name the main plugin file the same as the plugin slug ("oneofones-nospam.php" instead of "ooo-nospam.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
No dangerous file extensions were detected250 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12513214
Markdown120036

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin