80% lead-assign

Code Review | Lead Assign

WordPress plugin Lead Assign scored 80% from 54 tests.

About plugin

  • Plugin page: lead-assign
  • Plugin version:
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7
  • WordPress version: 5.8.1
  • First release: Dec 19, 2016
  • Latest release: Jan 24, 2017
  • Number of updates: 22
  • Update frequency: every 1.5 days
  • Top authors: ted537 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 406 total downloads


Plugin footprint 65% from 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.19MB] [CPU: ▼137.70ms] Passed 4 tests

This is a short check of server-side resources used by Lead Assign
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.2638.08 ▲8.05
Dashboard /wp-admin3.29 ▲0.2349.86 ▲2.90
Posts /wp-admin/edit.php3.33 ▲0.2249.43 ▲4.77
Add New Post /wp-admin/post-new.php5.58 ▲0.1593.56 ▼547.69
Media Library /wp-admin/upload.php3.17 ▲0.1735.17 ▼10.79
FAQ /wp-admin/admin.php?page=leadassign-faq3.1331.61
Floating Widget Area /wp-admin/options-general.php?page=floating-widget-area-settings3.1430.64
Lead Assign /wp-admin/options-general.php?page=lead-assign-settings3.1430.69

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 5 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Lead Assign
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,849 ▲27716.54 ▲0.8414.85 ▲2.5546.76 ▼12.65
Dashboard /wp-admin2,994 ▲606.01 ▲0.05142.89 ▼4.53111.52 ▼3.66
Posts /wp-admin/edit.php2,768 ▲292.73 ▲0.0171.71 ▲6.4587.41 ▲1.47
Add New Post /wp-admin/post-new.php1,700 ▲11918.72 ▲0.55401.88 ▼15.87106.02 ▼13.39
Media Library /wp-admin/upload.php1,834 ▲865.01 ▲0.03160.84 ▼0.01114.49 ▼60.94
FAQ /wp-admin/admin.php?page=leadassign-faq1,1312.0858.2660.29
Floating Widget Area /wp-admin/options-general.php?page=floating-widget-area-settings1,1162.3956.1170.73
Lead Assign /wp-admin/options-general.php?page=lead-assign-settings1,1682.1871.3165.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/lead-assign/uninstall.php+13
    Undefined variable: leadassign_setting_do_style_name
  • Zombie WordPress options detected upon uninstall: 2 options
    • widget_lead_assign_widget
    • leadassign_setting_do_style

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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: contact form 7, contact form, leads, sales

lead-assign/lead-assign.php Passed 13 tests

The entry point to "Lead Assign" version is a PHP file that has certain tags in its header comment area
52 characters long description:
Send leads from your website straight to Lead Assign

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
There were no executable files found in this plugin1,130 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods1071.43%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4896.00%
▷ Anonymous functions24.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
floating-widget-area/default-icon.png5.26KB3.33KB▼ 36.67%
img/logo.png10.69KB5.96KB▼ 44.22%