66% leadoma

Code Review | Leadoma Plugin

WordPress plugin Leadoma Plugin scored66%from 54 tests.

About plugin

  • Plugin page: leadoma
  • Plugin version: 2.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Aug 8, 2023
  • Number of updates: 21
  • Update frequency: every 7.6 days
  • Top authors: leadoma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /259 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.07ms] 75% from 4 tests

A check of server-side resources used by Leadoma Plugin
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 760.47ms on /wp-admin/admin.php?page=leadoma)
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0733.35 ▼6.67
Dashboard /wp-admin3.37 ▲0.0744.39 ▼3.43
Posts /wp-admin/edit.php3.42 ▲0.0748.22 ▼1.52
Add New Post /wp-admin/post-new.php5.97 ▲0.0990.59 ▼4.67
Media Library /wp-admin/upload.php3.30 ▲0.0736.15 ▲3.27
Leadoma /wp-admin/admin.php?page=leadoma3.33760.47
Login /wp-admin/admin.php?page=leadoma-login3.3032.66

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Leadoma Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲11213.48 ▼0.911.87 ▲0.1143.14 ▼0.97
Dashboard /wp-admin2,238 ▲505.14 ▼0.76111.63 ▼6.7480.40 ▲31.93
Posts /wp-admin/edit.php2,136 ▲472.32 ▲0.3340.57 ▲5.0337.63 ▲4.45
Add New Post /wp-admin/post-new.php1,710 ▲19622.93 ▲5.30753.04 ▲110.7348.09 ▼8.75
Media Library /wp-admin/upload.php1,498 ▲1134.55 ▲0.3999.90 ▲2.4267.71 ▲24.75
Leadoma /wp-admin/admin.php?page=leadoma8382.4230.6126.01
Login /wp-admin/admin.php?page=leadoma-login2,7132.0428.8136.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=leadoma
    • > Notice in wp-content/plugins/leadoma/includes/pages/admin/dashboard.php+251
    Undefined variable: monthlyCharts
    • > GET request to /wp-admin/admin.php?page=leadoma
    • > Notice in wp-content/plugins/leadoma/includes/pages/admin/dashboard.php+252
    Undefined variable: dailyCharts

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/leadoma/includes/pages/customers/components/additional-info.php
    • > /wp-content/plugins/leadoma/includes/pages/customers/components/notes.php
    • > /wp-content/plugins/leadoma/includes/pages/tags/tags.php
    • > /wp-content/plugins/leadoma/includes/pages/customers/components/tags.php
    • > /wp-content/plugins/leadoma/includes/pages/auth/auth.php
    • > /wp-content/plugins/leadoma/includes/pages/customers/components/basic-info.php
  • 47× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant LEADOMA_DIR_URL - assumed 'LEADOMA_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/leadoma/includes/pages/customers/components/basic-info.php on line 12
    • > PHP Warning
      include(LEADOMA_DIRincludes/api/auth/customers.php): failed to open stream: No such file or directory in wp-content/plugins/leadoma/includes/api/api.php on line 146
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/leadoma/includes/pages/admin/verify-email.php:21
    • > PHP Warning
      Use of undefined constant LEADOMA_DIR - assumed 'LEADOMA_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/leadoma/includes/api/api.php on line 145
    • > PHP Warning
      Use of undefined constant LEADOMA_DIR - assumed 'LEADOMA_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/leadoma/includes/pages/auth/auth.php on line 64
    • > PHP Warning
      Use of undefined constant LEADOMA_DIR - assumed 'LEADOMA_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/leadoma/includes/api/api.php on line 144
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/leadoma/includes/pages/auth/auth.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/leadoma/includes/api/auth/login-signup.php:13
    • > PHP Warning
      Use of undefined constant LEADOMA_DIR_URL - assumed 'LEADOMA_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/leadoma/includes/pages/auth/auth.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/leadoma/includes/pages/tags/tags.php:173

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=leadoma
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=leadoma 216:28 Uncaught TypeError: Cannot read properties of null (reading 'customers_count')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 require attention:
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

leadoma/leadoma.php 92% from 13 tests

The principal PHP file in "Leadoma Plugin" v. 2.3.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected22,220 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1337414615,010
CSS9149783,637
PHP243942042,659
SVG2151914

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2083.33%
▷ Protected methods416.67%
▷ Private methods00.00%
Functions56
▷ Named functions5598.21%
▷ Anonymous functions11.79%
Constants5
▷ Global constants5100.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
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
includes/pages/icon.png0.42KB0.37KB▼ 11.63%
admin/images/temp/profile.png18.25KB6.83KB▼ 62.58%