57% listplus

Code Review | ListPlus - Unlimited Listing Directory

WordPress plugin ListPlus - Unlimited Listing Directory scored 57% from 54 tests.

About plugin

  • Plugin page: listplus
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4
  • WordPress version: 5.9.2
  • First release: Apr 7, 2020
  • Latest release: Apr 8, 2020
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: listplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 407 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.02MB] [CPU: ▼286.76ms] Passed 4 tests

A check of server-side resources used by ListPlus - Unlimited Listing Directory
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.07 ▲2.5671.34 ▲19.86
Dashboard /wp-admin4.35 ▲0.9443.42 ▲10.75
Posts /wp-admin/edit.php4.56 ▲0.9249.35 ▲13.64
Add New Post /wp-admin/post-new.php8.15 ▲1.1892.10 ▼1,180.63
Media Library /wp-admin/upload.php4.32 ▲1.0233.07 ▲9.22
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius4.6233.77
New Listing /wp-admin/admin.php?page=listing_edit4.3535.67

Server storage [IO: ▲6.24MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 317 new files
Database: 8 new tables, 8 new options
New tables
wp_lp_reports
wp_lp_reviews
wp_lp_prop_meta
wp_lp_claim_entries
wp_lp_enquiries
wp_lp_scheduled_tasks
wp_lp_tax_relationships
wp_lp_item_meta
New WordPress options
fs_accounts
listplus_db_version
widget_listings-single
widget_listings-map
fs_active_plugins
fs_gdpr
fs_debug_mode
widget_listings-filter

Browser metrics Passed 4 tests

A check of browser resources used by ListPlus - Unlimited Listing Directory
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,260 ▲53818.01 ▲2.4124.03 ▲18.133.03 ▲0.98
Dashboard /wp-admin2,995 ▲1346.17 ▼0.02114.36 ▼22.51185.12 ▲22.00
Posts /wp-admin/edit.php2,793 ▲1023.25 ▲0.0165.42 ▲0.37153.52 ▲9.69
Add New Post /wp-admin/post-new.php1,759 ▲4021.08 ▼2.01435.07 ▲20.15160.69 ▲5.25
Media Library /wp-admin/upload.php1,797 ▲995.56 ▲0.03151.54 ▲7.13216.34 ▲26.88
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius1,4482.5454.93112.14
New Listing /wp-admin/admin.php?page=listing_edit2,0526.01135.96189.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/listplus/3rd/fs/includes/class-freemius.php+8218
    Undefined property: stdClass::$plugins
  • Zombie tables were found after uninstall: 8 tables
    • wp_lp_reports
    • wp_lp_prop_meta
    • wp_lp_enquiries
    • wp_lp_claim_entries
    • wp_lp_tax_relationships
    • wp_lp_item_meta
    • wp_lp_scheduled_tasks
    • wp_lp_reviews
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • fs_accounts
    • listplus_db_version
    • widget_listings-single
    • widget_listings-map
    • fs_gdpr
    • fs_active_plugins
    • fs_debug_mode
    • widget_listings-filter

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/listplus/3rd/fs/templates/ajax-loader.php
    • > /wp-content/plugins/listplus/templates/single/photos.php
  • 74× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/listplus/admin/views/view-edit-listing.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ListPlus\\CRUD\\Model' not found in wp-content/plugins/listplus/crud/class-claim.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/listplus/admin/inc/class-listing_type-table.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/listplus/admin/inc/class-reports-list-table.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/listplus/admin/inc/class-reviews-list-table.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/listplus/admin/inc/class-reviews-list-table.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/listplus/admin/inc/class-reports-list-table.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/listplus/3rd/fs/templates/account/partials/addon.php on line 8
    • > PHP Warning
      require_once(LISTPLUS_PATH/3rd/fs/start.php): failed to open stream: No such file or directory in wp-content/plugins/listplus/inc/fs.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'ListPlus\\CRUD\\Report' not found in wp-content/plugins/listplus/admin/views/view-report-details.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% 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 need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7 in listplus/assets to your readme.txt
The official readme.txt might help

listplus/index.php 69% from 13 tests

The main PHP file in "ListPlus - Unlimited Listing Directory" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("listplus.php" instead of "index.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path must begin with a forward slash character ("/languages/")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected81,965 lines of code in 248 files:
LanguageFilesBlank linesComment linesLines of code
PHP1849,47717,72444,760
PO File126,9608,45515,240
JavaScript212,4312,33011,239
CSS20403706,215
Sass6220344,301
SQL1171129
SVG20056
Markdown12024
JSON1001

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity64.93
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes89
▷ Abstract classes22.25%
▷ Concrete classes8797.75%
▷ Final classes00.00%
Methods1,781
▷ Static methods26714.99%
▷ Public methods1,32474.34%
▷ Protected methods1086.06%
▷ Private methods34919.60%
Functions106
▷ Named functions10599.06%
▷ Anonymous functions10.94%
Constants125
▷ Global constants9878.40%
▷ Class constants2721.60%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
3rd/fs/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/images/rate-star-inactive.png2.53KB1.67KB▼ 34.22%
assets/lightslider/img/controls.png2.19KB0.95KB▼ 56.49%
assets/images/rate-star-low.png2.61KB1.67KB▼ 36.08%
assets/images/rate-star-height.png2.66KB1.67KB▼ 37.41%