83% lead-call-buttons

Code Review | Lead Call Buttons

WordPress plugin Lead Call Buttons scored 83% from 54 tests.

About plugin

  • Plugin page: lead-call-buttons
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Mar 5, 2015
  • Latest release: Jan 6, 2021
  • Number of updates: 68
  • Update frequency: every 31.4 days
  • Top authors: polishyourimage (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

9,000+ active / 40,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼9.27ms] Passed 4 tests

Server-side resources used by Lead Call Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1637.40 ▼5.11
Dashboard /wp-admin3.43 ▲0.1243.55 ▼10.69
Posts /wp-admin/edit.php3.54 ▲0.1848.63 ▼2.26
Add New Post /wp-admin/post-new.php6.01 ▲0.1279.73 ▼19.00
Media Library /wp-admin/upload.php3.35 ▲0.1234.25 ▼1.88
Lead Call Buttons /wp-admin/options-general.php?page=lead_call_buttons3.3230.70

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Lead Call Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲18013.70 ▼0.679.28 ▲7.3438.15 ▼5.53
Dashboard /wp-admin2,216 ▲285.12 ▲0.17113.60 ▼3.1343.87 ▼3.21
Posts /wp-admin/edit.php2,110 ▲242.30 ▲0.2535.22 ▼1.2329.78 ▼2.13
Add New Post /wp-admin/post-new.php6,460 ▲4,94620.31 ▲2.81899.61 ▲223.5458.05 ▲7.44
Media Library /wp-admin/upload.php1,411 ▲234.24 ▲0.0195.99 ▲0.1840.66 ▼0.31
Lead Call Buttons /wp-admin/options-general.php?page=lead_call_buttons1,0232.1439.1329.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_queried_object_id() on null in wp-content/plugins/lead-call-buttons/lead-call-buttons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lead-call-buttons/plugin-main.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt is a good inspiration

lead-call-buttons/plugin-main.php 85% from 13 tests

"Lead Call Buttons" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lead-call-buttons.php" instead of "plugin-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin798 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP48117662
JavaScript28094
CSS38142

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity24.50
▷ Minimum class complexity3.00
▷ Maximum class complexity46.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin