10% aeroleads-contact-us-details

Code Review | AeroLeads Contact Us Details

WordPress plugin AeroLeads Contact Us Details scored 10% from 54 tests.

About plugin

  • Plugin page: aeroleads-contact...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 5.8.1
  • First release: Jan 19, 2015
  • Latest release: Feb 2, 2015
  • Number of updates: 21
  • Update frequency: every 0.7 days
  • Top authors: anurag722 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active / 9,906 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/aeroleads-contact-us-details/includes/class-alcud-widget.php+289
    Function create_function() is deprecated

Server metrics [RAM: ▼1.80MB] [CPU: ▼193.78ms] Passed 4 tests

Analyzing server-side resources used by AeroLeads Contact Us Details
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.83 ▼0.895.12 ▼18.68
Dashboard /wp-admin1.85 ▼1.218.87 ▼40.08
Posts /wp-admin/edit.php1.85 ▼1.265.33 ▼41.86
Add New Post /wp-admin/post-new.php1.85 ▼3.595.62 ▼664.00
Media Library /wp-admin/upload.php1.85 ▼1.155.08 ▼29.17

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 124 new files
Database: 2 new tables, 1 new option
New tables
wp_alcud_options
wp_alcud
New WordPress options
widget_alcud-widget

Browser metrics Passed 4 tests

An overview of browser requirements for AeroLeads Contact Us Details
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,846 ▲25016.63 ▲1.0814.34 ▲5.1951.38 ▲1.51
Dashboard /wp-admin2,998 ▲676.28 ▲0.34147.23 ▼2.78118.38 ▼0.83
Posts /wp-admin/edit.php2,768 ▲292.76 ▲0.0674.61 ▲2.5182.83 ▼12.38
Add New Post /wp-admin/post-new.php1,707 ▲2418.76 ▼0.04395.02 ▲6.08125.18 ▲13.99
Media Library /wp-admin/upload.php1,833 ▲235.17 ▲0.14137.26 ▼20.75130.13 ▲3.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/aeroleads-contact-us-details/includes/class-alcud-widget.php+289
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_alcud-widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 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
Please take a closer look at the following
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/aeroleads-contact-us-details/shortcodes/alcud-shortcode-flat.php
    • > /wp-content/plugins/aeroleads-contact-us-details/widget/views/widget2.php
    • > /wp-content/plugins/aeroleads-contact-us-details/shortcodes/alcud-shortcodes.php
    • > /wp-content/plugins/aeroleads-contact-us-details/public/partials/alcud-public-display.php
    • > /wp-content/plugins/aeroleads-contact-us-details/admin/partials/alcud-admin-display.php
    • > /wp-content/plugins/aeroleads-contact-us-details/widget/views/widget.php
  • 47× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: img_url in wp-content/plugins/aeroleads-contact-us-details/admin/partials/alcud-admin-display.php on line 199
    • > PHP Notice
      Undefined variable: open_hours in wp-content/plugins/aeroleads-contact-us-details/shortcodes/alcud-shortcode-flat.php on line 37
    • > PHP Notice
      Undefined variable: contact_number in wp-content/plugins/aeroleads-contact-us-details/widget/views/widget2.php on line 37
    • > PHP Notice
      Undefined variable: note in wp-content/plugins/aeroleads-contact-us-details/widget/views/widget2.php on line 55
    • > PHP Notice
      Undefined variable: contact_person in wp-content/plugins/aeroleads-contact-us-details/admin/partials/alcud-admin-display.php on line 41
    • > PHP Notice
      Undefined variable: img_url in wp-content/plugins/aeroleads-contact-us-details/admin/partials/alcud-admin-display.php on line 128
    • > PHP Notice
      Undefined variable: email_address in wp-content/plugins/aeroleads-contact-us-details/shortcodes/alcud-shortcodes.php on line 33
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/aeroleads-contact-us-details/widget/views/admin.php:3
    • > PHP Notice
      Undefined variable: note in wp-content/plugins/aeroleads-contact-us-details/shortcodes/alcud-shortcodes.php on line 55
    • > PHP Notice
      Undefined variable: contact_person in wp-content/plugins/aeroleads-contact-us-details/shortcodes/alcud-shortcodes.php on line 27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === aeroleads-contact-us-details === )
  • Tags: There are too many tags (31 tag instead of maximum 10)
The official readme.txt is a good inspiration

aeroleads-contact-us-details/alcud.php 85% from 13 tests

The main PHP file in "AeroLeads Contact Us Details" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aeroleads-contact-us-details.php" instead of "alcud.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin9,162 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
SVG7107,389
PHP18243656929
CSS107629708
JavaScript62431119
PO File10017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.12
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods3788.10%
▷ Protected methods00.00%
▷ Private methods511.90%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.52MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/shortcode-1.mob.png38.59KB13.90KB▼ 63.98%
admin/images/aeroleads-icon.png239.13KB95.07KB▼ 60.24%
admin/images/shortcode-1.png53.77KB16.50KB▼ 69.31%
admin/images/widget-1.png35.81KB11.93KB▼ 66.70%
admin/images/shortcode-2.png58.41KB17.92KB▼ 69.32%