90% geek-mail-whitelist

Code Review | Geek Mail Whitelist

WordPress plugin Geek Mail Whitelist scored90%from 54 tests.

About plugin

  • Plugin page: geek-mail-whitelist
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.1.0
  • WordPress version: 6.3.1
  • First release: May 6, 2019
  • Latest release: May 6, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: gongwan33 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /508 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Geek Mail Whitelist
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0444.06 ▲1.05
Dashboard /wp-admin3.35 ▲0.0549.89 ▼6.97
Posts /wp-admin/edit.php3.47 ▲0.1150.00 ▼0.95
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.69 ▼15.98
Media Library /wp-admin/upload.php3.28 ▲0.0439.02 ▼0.52

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: 1 new table, 7 new options
New tables
wp_gmw_whitelist
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
gmw-enabled
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Geek Mail Whitelist
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.28 ▼0.071.66 ▼0.1841.20 ▼1.27
Dashboard /wp-admin2,214 ▲435.57 ▼0.0390.82 ▼5.5239.46 ▼0.69
Posts /wp-admin/edit.php2,116 ▲192.02 ▼0.0037.73 ▲1.9033.57 ▼2.30
Add New Post /wp-admin/post-new.php1,544 ▲1323.16 ▼0.06676.47 ▼8.4656.13 ▼1.15
Media Library /wp-admin/upload.php1,413 ▲164.19 ▼0.02107.11 ▲0.6854.14 ▲8.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 uses markdown syntax to describe your plugin to the world
4 plugin tags: email whitelist, email, spam, registration

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

Analyzing the main PHP file in "Geek Mail Whitelist" version 1.0.0
43 characters long description:
Allow users with certain emails to register

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin459 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP59725413
SVG10146

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.50
▷ Minimum class complexity12.00
▷ Maximum class complexity19.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods17100.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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.21MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png218.14KB64.51KB▼ 70.43%