68% spam-oborona-yandexcleanweb

Code Review | Spam Oborona YandexCleanWeb

WordPress plugin Spam Oborona YandexCleanWeb scored 68% from 54 tests.

About plugin

  • Plugin page: spam-oborona-yand...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 5.8.1
  • First release: Aug 8, 2014
  • Latest release: Oct 29, 2015
  • Number of updates: 20
  • Update frequency: every 22.4 days
  • Top authors: northmule (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 639 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.69MB] [CPU: ▼190.37ms] Passed 4 tests

An overview of server-side resources used by Spam Oborona YandexCleanWeb
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.94 ▼0.899.66 ▼27.82
Dashboard /wp-admin1.96 ▼1.108.83 ▼38.84
Posts /wp-admin/edit.php1.96 ▼1.159.62 ▼39.30
Add New Post /wp-admin/post-new.php1.96 ▼3.487.51 ▼655.53
Media Library /wp-admin/upload.php1.96 ▼1.049.46 ▼26.74
SpamOborona /wp-admin/options-general.php?page=spam-oborona-opt1.966.87

Server storage [IO: ▲0.06MB] [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: 11 new files
Database: no new tables, 3 new options
New WordPress options
old_spam_comment_number
spam_comment_number
widget_spamoborona_1

Browser metrics Passed 4 tests

This is an overview of browser requirements for Spam Oborona YandexCleanWeb
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,717 ▲14515.78 ▼0.208.57 ▼0.8750.18 ▼3.44
Dashboard /wp-admin2,978 ▲446.06 ▲0.07148.55 ▼2.99119.21 ▲4.17
Posts /wp-admin/edit.php2,744 ▲52.69 ▲0.0068.89 ▼0.0796.61 ▲0.72
Add New Post /wp-admin/post-new.php1,618 ▼6520.94 ▲2.21286.33 ▼109.24117.33 ▲2.95
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.02149.22 ▼33.99121.16 ▼2.55
SpamOborona /wp-admin/options-general.php?page=spam-oborona-opt2,0099.84266.2186.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5505
    load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_spamoborona_1

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=spam-oborona-opt
    • > User deprecated in wp-includes/functions.php+5505
    load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=spam-oborona-opt
    • > Notice in wp-content/plugins/spam-oborona-yandexcleanweb/inc/widget-class.php+20
    Trying to access array offset on value of type int
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=spam-oborona-opt
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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 fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/spam-oborona-yandexcleanweb/spob-opt.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/spam-oborona-yandexcleanweb/index-spam-oborona.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/spam-oborona-yandexcleanweb/index-spam-oborona.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/spam-oborona-yandexcleanweb/inc/widget-class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/spam-oborona-yandexcleanweb/inc/widget-class.php:6

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can look at the official readme.txt

spam-oborona-yandexcleanweb/index-spam-oborona.php 85% from 13 tests

Analyzing the main PHP file in "Spam Oborona YandexCleanWeb" version 1.3.3
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("spam-oborona-yandexcleanweb.php" instead of "index-spam-oborona.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 225 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected578 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5103190559
CSS16019

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.18
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/help.png5.05KB3.13KB▼ 38.11%