72% leader-api

Code Review | Leader API for elementor

WordPress plugin Leader API for elementor scored72%from 54 tests.

About plugin

  • Plugin page: leader-api
  • Plugin version: 4.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.1
  • WordPress version: 6.3.1
  • First release: Aug 6, 2021
  • Latest release: Feb 25, 2022
  • Number of updates: 15
  • Update frequency: every 13.5 days
  • Top authors: hosamm93 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.62ms] Passed 4 tests

This is a short check of server-side resources used by Leader API for elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.49 ▼4.38
Dashboard /wp-admin3.32 ▼0.0351.32 ▼18.85
Posts /wp-admin/edit.php3.37 ▲0.0149.09 ▲1.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.71 ▼8.62
Media Library /wp-admin/upload.php3.24 ▲0.0138.29 ▲6.10
LeaderApi /wp-admin/options-general.php?page=leaderApiConnection3.2331.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
leaderApi_leader_id
leaderApi_token
db_upgraded
leaderApi_client_id
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Leader API for elementor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.171.64 ▼0.2741.02 ▼2.02
Dashboard /wp-admin2,199 ▲225.50 ▼0.1794.86 ▲4.3639.58 ▼0.29
Posts /wp-admin/edit.php2,104 ▲11.99 ▲0.0239.41 ▲0.5634.87 ▼1.41
Add New Post /wp-admin/post-new.php1,538 ▲1218.17 ▼5.41620.09 ▼34.9465.77 ▲22.65
Media Library /wp-admin/upload.php1,404 ▲74.19 ▼0.0498.26 ▼9.4345.00 ▲0.03
LeaderApi /wp-admin/options-general.php?page=leaderApiConnection8352.0328.7557.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • leaderApi_client_id
    • can_compress_scripts
    • leaderApi_token
    • leaderApi_leader_id
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=leaderApiConnection
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=leaderApiConnection
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/leader-api/leader-api.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/leader-api/includes/api.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/leader-api/includes/admin-page.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: leader, connection, form

leader-api/leader-api.php 92% from 13 tests

The main file in "Leader API for elementor" v. 4.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Everything looks great! No dangerous files found in this plugin106 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31022106

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin