87% dpabadbotwp

Code Review | dpaBadBotWP

WordPress plugin dpaBadBotWP scored 87% from 54 tests.

About plugin

  • Plugin page: dpabadbotwp
  • Plugin version: 1.27 [20200927]
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-5.5.1
  • WordPress version: 5.8.1
  • First release: Jul 26, 2014
  • Latest release: Sep 27, 2020
  • Number of updates: 58
  • Update frequency: every 39.1 days
  • Top authors: peter achutha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,570 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.28MB] [CPU: ▼153.35ms] Passed 4 tests

An overview of server-side resources used by dpaBadBotWP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0633.85 ▲0.57
Dashboard /wp-admin3.13 ▲0.0740.73 ▲5.57
Posts /wp-admin/edit.php3.18 ▲0.0743.06 ▼0.39
Add New Post /wp-admin/post-new.php4.11 ▼1.3347.07 ▼611.45
Media Library /wp-admin/upload.php3.07 ▲0.0631.11 ▼2.14
DpaBadBotWPMenu /wp-admin/options-general.php?page=dpaBadBotWP_Menu3.1631.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by dpaBadBotWP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,690 ▲9415.93 ▲0.338.40 ▼2.5746.85 ▼6.08
Dashboard /wp-admin2,972 ▲355.87 ▼0.09130.05 ▼17.95112.17 ▲8.75
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0062.55 ▼6.5398.66 ▲4.90
Add New Post /wp-admin/post-new.php1,879 ▲37519.14 ▲0.61354.77 ▼18.56103.80 ▼1.44
Media Library /wp-admin/upload.php1,815 ▲115.03 ▼0.06146.05 ▼10.92123.19 ▲7.69
DpaBadBotWPMenu /wp-admin/options-general.php?page=dpaBadBotWP_Menu1,3012.1052.82115.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely 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 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=dpaBadBotWP_Menu
    • > Warning in wp-content/plugins/dpabadbotwp/dpabadbotWP-functionality.php+215
    fopen(wp-content/uploads/dpabadbotwp/.htaccess): failed to open stream: No such file or directory
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dpaBadBotWP_Menu
    • > Warning in wp-content/plugins/dpabadbotwp/dpabadbotWP-functionality.php+216
    fwrite() expects parameter 1 to be resource, bool given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dpaBadBotWP_Menu
    • > Warning in wp-content/plugins/dpabadbotwp/dpabadbotWP-functionality.php+217
    fflush() expects parameter 1 to be resource, bool given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dpaBadBotWP_Menu
    • > Warning in wp-content/plugins/dpabadbotwp/dpabadbotWP-functionality.php+218
    fclose() expects parameter 1 to be resource, bool given
    • > GET request to /wp-admin/options-general.php?page=dpaBadBotWP_Menu
    • > Warning in wp-content/plugins/dpabadbotwp/dpabadbotWP-functionality.php+215
    fopen(dpabadbot/config/wpposts.txt): failed to open stream: No such file or directory

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dpabadbotwp/spmy_dpabadbot_form.php
    • > /wp-content/plugins/dpabadbotwp/dpabadbotWP-functionality.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Shows that only one field data needs to be entered and that is the directory where The Bad Bot Exterminator is located. Also shows what IP addresses you have been using to access your WordPress site. screenshot-1.png), #2 (Shows who has logged in. If ID >= 1 user has logged in. If ID = 0 then the user could not login. The next column shows which pages they visited. screenshot-2.png)
Please take inspiration from this readme.txt

dpabadbotwp/dpabadbotWP-functionality.php 77% from 13 tests

The main file in "dpaBadBotWP" v. 1.27 [20200927] serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dpabadbotwp.php" instead of "dpabadbotWP-functionality.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 1045 characters long)
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "1.27 [20200927]")

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
Good job! No executable or dangerous file extensions detected708 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions12100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
11 compressed PNG files occupy 0.50MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
sfc30.png8.25KB4.19KB▼ 49.23%
ich30.png4.37KB4.11KB▼ 6.05%
dpabadbotpix800.png35.91KB33.04KB▼ 8.00%
bottomofpagestrip.png3.37KB3.17KB▼ 5.80%
bbbh30.png4.81KB4.54KB▼ 5.49%