90% gm-block-bots

Code Review | GM Block Bots

WordPress plugin GM Block Bots scored90%from 54 tests.

About plugin

  • Plugin page: gm-block-bots
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2015
  • Latest release: Mar 1, 2017
  • Number of updates: 45
  • Update frequency: every 15.8 days
  • Top authors: mickmel (97.78%)ashlealanier (4.44%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /73,645 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.41ms] Passed 4 tests

This is a short check of server-side resources used by GM Block Bots
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.08 ▼1.37
Dashboard /wp-admin3.34 ▲0.0445.28 ▼4.88
Posts /wp-admin/edit.php3.39 ▲0.0445.81 ▲1.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.27 ▼1.30
Media Library /wp-admin/upload.php3.27 ▲0.0434.61 ▲2.03

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for GM Block Bots
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.151.78 ▼0.1443.80 ▼4.21
Dashboard /wp-admin2,209 ▲214.86 ▲0.0098.52 ▼17.8640.87 ▼3.03
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0533.89 ▼3.8635.50 ▼0.27
Add New Post /wp-admin/post-new.php1,513 ▲11417.36 ▼0.32686.89 ▲34.2349.28 ▼14.33
Media Library /wp-admin/upload.php1,388 ▲64.17 ▼0.0294.28 ▼6.4040.91 ▼0.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Activation link. There are no other screenshots, because the plugin works silently behind the scenes.) image required
The official readme.txt might help

gm-block-bots/gm-block-bots.php Passed 13 tests

The principal PHP file in "GM Block Bots" v. 2.0.2 is loaded by WordPress automatically on each request
58 characters long description:
Blocks traffic from SEMalt, buttons-for-website and others

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
Success! There were no dangerous files found in this plugin220 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1109220

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.15KB13.78KB▼ 55.75%