67% local-listing-pro

Code Review | Local Listing Pro

WordPress plugin Local Listing Pro scored 67% from 54 tests.

About plugin

  • Plugin page: local-listing-pro
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.0.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2016
  • Latest release: May 13, 2019
  • Number of updates: 101
  • Update frequency: every 9.5 days
  • Top authors: toddbryson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 3,112 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.89MB] [CPU: ▼2.46ms] Passed 4 tests

Analyzing server-side resources used by Local Listing Pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9241.65 ▼2.71
Dashboard /wp-admin4.23 ▲0.9350.18 ▼1.95
Posts /wp-admin/edit.php4.28 ▲0.9352.78 ▲5.11
Add New Post /wp-admin/post-new.php6.75 ▲0.8689.28 ▼9.85
Media Library /wp-admin/upload.php4.09 ▲0.8641.94 ▲4.68

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 355 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Local Listing Pro: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8813.60 ▼1.145.19 ▲3.1840.33 ▼7.64
Dashboard /wp-admin2,229 ▲445.81 ▼0.0796.79 ▼24.0841.24 ▼5.36
Posts /wp-admin/edit.php2,106 ▲172.01 ▼0.0438.92 ▲5.4534.48 ▲0.98
Add New Post /wp-admin/post-new.php1,555 ▲4122.14 ▲4.36673.51 ▲1.6362.50 ▲4.68
Media Library /wp-admin/upload.php1,402 ▲144.18 ▼0.06103.98 ▼14.4643.25 ▼5.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/local-listing-pro/templates/local_listing_pro_reactivate_business.php
    • > /wp-content/plugins/local-listing-pro/templates/llsp_upgraded_business_mail.php
    • > /wp-content/plugins/local-listing-pro/templates/emails/llsp_submit_business_mail.php
    • > /wp-content/plugins/local-listing-pro/templates/emails/llsp_delete_subscription.php
    • > /wp-content/plugins/local-listing-pro/templates/emails/llsp_invoice.php
    • > /wp-content/plugins/local-listing-pro/index.php
    • > /wp-content/plugins/local-listing-pro/templates/local_listing_pro_business_details.php
    • > /wp-content/plugins/local-listing-pro/templates/local_listing_pro_citations.php
    • > /wp-content/plugins/local-listing-pro/templates/local_listing_pro_page_loader.php
    • > /wp-content/plugins/local-listing-pro/inc/Stripe/build.php
  • 146× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/local-listing-pro/templates/emails/llsp_admin_support_ticket.php on line 639
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_InvalidRequestError' not found in wp-content/plugins/local-listing-pro/inc/Stripe1/lib/Stripe/RateLimitError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'StripeTestCase' not found in wp-content/plugins/local-listing-pro/inc/Stripe1/test/Stripe/ChargeTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'StripeTestCase' not found in wp-content/plugins/local-listing-pro/inc/Stripe1/test/Stripe/CardErrorTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/local-listing-pro/inc/Stripe/tests/ApplicationFeeRefundTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/local-listing-pro/inc/Stripe1/lib/Stripe/Transfer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/local-listing-pro/inc/Stripe1/lib/Stripe/Card.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'StripeTestCase' not found in wp-content/plugins/local-listing-pro/inc/Stripe1/test/Stripe/BitcoinReceiverTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ExternalAccount' not found in wp-content/plugins/local-listing-pro/inc/Stripe/lib/AlipayAccount.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'UnitTestCase' not found in wp-content/plugins/local-listing-pro/inc/Stripe1/test/Stripe/Error.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

local-listing-pro/local_listing_pro.php 77% from 13 tests

The primary PHP file in "Local Listing Pro" version 1.0.11 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("local-listing-pro.php" instead of "local_listing_pro.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Please fix the following items
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/local-listing-pro/inc/Stripe/data/ca-certificates.crt
      • wp-content/plugins/local-listing-pro/inc/Stripe1/lib/data/ca-certificates.crt
28,499 lines of code in 218 files:
LanguageFilesBlank linesComment linesLines of code
PHP1943,6882,99316,451
CSS5120699,713
JavaScript8252191,209
SVG200733
Markdown21730266
JSON20065
YAML36032
XML20030

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.74
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces4
Interfaces3
Traits0
Classes153
▷ Abstract classes106.54%
▷ Concrete classes14393.46%
▷ Final classes00.00%
Methods712
▷ Static methods19427.25%
▷ Public methods65191.43%
▷ Protected methods375.20%
▷ Private methods243.37%
Functions10
▷ Named functions550.00%
▷ Anonymous functions550.00%
Constants12
▷ Global constants650.00%
▷ Class constants650.00%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
57 PNG files occupy 0.49MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/Stripe1/test/data/test.png0.09KB0.09KB0.00%
images/directory_logo/N49.png10.99KB4.27KB▼ 61.13%
images/directory_logo/YaSabe.png11.39KB3.12KB▼ 72.62%
images/invalid-icon.png7.98KB3.72KB▼ 53.38%
images/directory_logo/Judybook.png9.34KB3.37KB▼ 63.93%