83% last-email-address-validator

Code Review | LEAV Last Email Address Validator

WordPress plugin LEAV Last Email Address Validator scored83%from 54 tests.

About plugin

  • Plugin page: last-email-addres...
  • Plugin version: 1.7.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.1
  • WordPress version: 6.3.1
  • First release: Dec 10, 2020
  • Latest release: Apr 20, 2021
  • Number of updates: 21
  • Update frequency: every 6.3 days
  • Top authors: smings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /897 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.92MB] [CPU: ▲0.93ms] Passed 4 tests

An overview of server-side resources used by LEAV Last Email Address Validator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.42 ▲0.9643.46 ▲1.86
Dashboard /wp-admin4.25 ▲0.9552.61 ▲0.61
Posts /wp-admin/edit.php4.30 ▲0.9552.32 ▲4.14
Add New Post /wp-admin/post-new.php6.77 ▲0.88100.38 ▼2.88
Media Library /wp-admin/upload.php4.11 ▲0.8844.86 ▲7.21

Server storage [IO: ▲0.77MB] [DB: ▲0.04MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
leav_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

LEAV Last Email Address Validator: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲9514.38 ▲0.351.72 ▼0.3037.22 ▼0.86
Dashboard /wp-admin2,262 ▲855.54 ▼0.1186.56 ▼6.3843.95 ▲1.13
Posts /wp-admin/edit.php2,168 ▲712.14 ▲0.1338.43 ▲0.3134.09 ▼2.60
Add New Post /wp-admin/post-new.php1,574 ▲4323.33 ▲0.29606.74 ▼75.7960.00 ▲6.00
Media Library /wp-admin/upload.php1,468 ▲684.26 ▲0.03101.06 ▼13.6146.56 ▲0.15

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
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/last-email-address-validator/last-email-address-validator.php
    • > /wp-content/plugins/last-email-address-validator/uninstall.php
    • > /wp-content/plugins/last-email-address-validator/includes/leav-class.inc.php
    • > /wp-content/plugins/last-email-address-validator/includes/leav-settings-page.inc.php
    • > /wp-content/plugins/last-email-address-validator/includes/leav-helper-functions.inc.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

last-email-address-validator/last-email-address-validator.php 92% from 13 tests

This is the main PHP file of "LEAV Last Email Address Validator" version 1.7.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected5,168 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP75572293,729
PO File13468601,438
SVG1001

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity132.75
▷ Minimum class complexity2.00
▷ Maximum class complexity244.00
Average method complexity7.35
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods83
▷ Static methods00.00%
▷ Public methods5566.27%
▷ Protected methods00.00%
▷ Private methods2833.73%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/img/banner-772x250.png26.44KB9.29KB▼ 64.85%
includes/img/icon-256x256.png7.82KB3.20KB▼ 59.07%
includes/img/icon-128x128.png4.53KB1.66KB▼ 63.36%