62% wp-autolead

Code Review | WordPress AutoLead

WordPress plugin WordPress AutoLead scored62%from 54 tests.

About plugin

  • Plugin page: wp-autolead
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7
  • WordPress version: 6.3.1
  • First release: Feb 9, 2014
  • Latest release: Mar 17, 2021
  • Number of updates: 17
  • Update frequency: every 152.5 days
  • Top authors: mag_oberon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,368 total downloads

Benchmarks

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

A check of server-side resources used by WordPress AutoLead
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1938.08 ▼4.44
Dashboard /wp-admin3.49 ▲0.1848.09 ▲1.12
Posts /wp-admin/edit.php3.60 ▲0.2451.98 ▲7.93
Add New Post /wp-admin/post-new.php6.07 ▲0.1888.80 ▼5.65
Media Library /wp-admin/upload.php3.41 ▲0.1835.87 ▲3.36
AutoLead /wp-admin/edit.php?post_type=cptautolead3.4538.90
AutoLead Subscribers /wp-admin/edit.php?post_type=cptautolead&page=autolead-subscribers3.4232.35
Add New AutoLead /wp-admin/post-new.php?post_type=cptautolead3.3937.88

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 38 new files
Database: 2 new tables, 8 new options
New tables
wp_autolead_submits
wp_autolead_submits_meta
New WordPress options
widget_recent-comments
autolead_submits_meta_table_version
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
autolead_submits_table_version

Browser metrics Passed 4 tests

Checking browser requirements for WordPress AutoLead
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.68 ▼1.071.69 ▼0.0941.67 ▼1.05
Dashboard /wp-admin2,237 ▲454.86 ▼0.04106.07 ▼12.3539.36 ▲1.29
Posts /wp-admin/edit.php2,120 ▲312.05 ▲0.0739.36 ▲3.5835.35 ▲3.01
Add New Post /wp-admin/post-new.php1,564 ▲3023.40 ▼0.01670.79 ▼18.2150.05 ▼4.58
Media Library /wp-admin/upload.php1,419 ▲314.16 ▼0.0396.16 ▼0.5344.93 ▲0.61
AutoLead /wp-admin/edit.php?post_type=cptautolead1,0922.0032.6230.39
AutoLead Subscribers /wp-admin/edit.php?post_type=cptautolead&page=autolead-subscribers1,1071.7125.2928.22
Add New AutoLead /wp-admin/post-new.php?post_type=cptautolead2,6577.94166.7646.62

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 does not fully uninstall, leaving 2 tables in the database
    • wp_autolead_submits
    • wp_autolead_submits_meta
  • Zombie WordPress options detected upon uninstall: 8 options
    • autolead_submits_meta_table_version
    • can_compress_scripts
    • autolead_submits_table_version
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/edit.php?post_type=cptautolead&page=autolead-subscribers
    • > Notice in wp-content/plugins/wp-autolead/views/list-tables/list-subscribers.php+129
    Trying to access array offset on value of type null
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=cptautolead
    • > Notice in wp-content/plugins/wp-autolead/autolead.php+241
    Trying to get property 'name' of non-object

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-autolead/views/settings/autolead-title-options.php
    • > /wp-content/plugins/wp-autolead/views/settings/autolead-choice-options.php
    • > /wp-content/plugins/wp-autolead/views/settings/autolead-button-options.php
    • > /wp-content/plugins/wp-autolead/views/settings/autolead-list-options.php
    • > /wp-content/plugins/wp-autolead/views/settings/autolead-content-options.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-autolead/views/meta/autolead-builder.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-autolead/views/meta/autolead-arcode.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-autolead/views/meta/autolead-title-options.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-autolead/views/meta/autolead-after-survey.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-autolead/views/meta/autolead-list-options.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-autolead/views/meta/autolead-content-options.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-autolead/autolead.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-autolead/views/list-tables/list-subscribers.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-autolead/views/settings/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-autolead/views/meta/autolead-choice-options.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
9 plugin tags: wp lead, autolead, lead capture, plugin, autolead plugin...

wp-autolead/autolead.php 92% from 13 tests

The principal PHP file in "WordPress AutoLead" v. 1.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-autolead.php" instead of "autolead.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin4,578 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS685892,338
PHP173344291,323
JavaScript8180233689
SVG100228

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity32.25
▷ Minimum class complexity14.00
▷ Maximum class complexity77.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods59
▷ Static methods00.00%
▷ Public methods59100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/bg-radio-buttons.png2.78KB1.67KB▼ 40.12%