10% geek-mail-blacklist

Code Review | Geek Mail Blacklist

WordPress plugin Geek Mail Blacklist scored10%from 54 tests.

About plugin

  • Plugin page: geek-mail-blacklist
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2019
  • Latest release: May 2, 2019
  • Number of updates: 5
  • Update frequency: every 1.6 days
  • Top authors: gongwan33 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /564 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/geek-mail-blacklist/lib/GMB.php+51
    Undefined variable: charset_collate

Server metrics [RAM: ▲0.12MB] [CPU: ▲4.72ms] Passed 4 tests

This is a short check of server-side resources used by Geek Mail Blacklist
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1148.18 ▲4.67
Dashboard /wp-admin68.65 ▲65.3013,496,728.91 ▲13,496,672.15
Posts /wp-admin/edit.php3.57 ▲0.1660.57 ▲10.25
Add New Post /wp-admin/post-new.php6.03 ▲0.10101.97 ▼2.83
Media Library /wp-admin/upload.php3.38 ▲0.1045.16 ▲6.78

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 21 new files
Database: 2 new tables, 7 new options
New tables
wp_gmb_monitor
wp_gmb_blacklist
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
gmb-enabled
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Geek Mail Blacklist: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.17 ▼0.541.84 ▼0.0343.90 ▲0.18
Dashboard /wp-admin2,205 ▲345.57 ▼0.0794.02 ▼8.9941.84 ▼0.81
Posts /wp-admin/edit.php2,119 ▲192.01 ▼0.0041.62 ▲2.8135.62 ▲0.07
Add New Post /wp-admin/post-new.php1,541 ▲1621.02 ▼0.05698.58 ▲60.3359.82 ▲11.59
Media Library /wp-admin/upload.php1,413 ▲134.17 ▲0.06112.26 ▼3.5649.33 ▲1.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • 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
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: spam, email, blacklist

geek-mail-blacklist/geek-mail-blacklist.php Passed 13 tests

The main PHP file in "Geek Mail Blacklist" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
49 characters long description:
Block users with certain Emails from registration

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin921 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1214922688
JavaScript2187148
CSS215056
SVG10129

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.29
Average class complexity11.60
▷ Minimum class complexity7.00
▷ Maximum class complexity20.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods36
▷ Static methods36100.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants1178.57%
▷ Class constants321.43%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.55MB with 0.38MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png213.79KB65.25KB▼ 69.48%
screenshot-1.png193.38KB59.52KB▼ 69.22%
screenshot-2.png155.73KB45.56KB▼ 70.74%