88% plms

Code Review | Property Lot Management System

WordPress plugin Property Lot Management System scored 88% from 54 tests.

About plugin

  • Plugin page: plms
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 5.8.1
  • First release: Jul 16, 2015
  • Latest release: Jul 16, 2015
  • Number of updates: 6
  • Update frequency: every 1.7 days
  • Top authors: aditya.dugar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 539 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.48MB] [CPU: ▼142.59ms] Passed 4 tests

An overview of server-side resources used by Property Lot Management System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.19 ▲0.4737.77 ▲16.07
Dashboard /wp-admin3.55 ▲0.5059.84 ▲12.50
Posts /wp-admin/edit.php3.59 ▲0.4848.38 ▲2.36
Add New Post /wp-admin/post-new.php6.08 ▲0.6589.78 ▼584.50
Media Library /wp-admin/upload.php3.45 ▲0.4534.48 ▼0.71
Add Lot /wp-admin/admin.php?page=add_lot3.5034.96
Add Property /wp-admin/admin.php?page=add_property3.4735.06
Property /wp-admin/admin.php?page=list_property3.4634.91
Edit Lot /wp-admin/admin.php?page=edit_lot3.6428.69
Install Plugins /wp-admin/themes.php?page=plms-install-plugins3.4731.52
Lot /wp-admin/admin.php?page=list_lot3.4934.39

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: 5 new tables, no new options
New tables
wp_property_resources
wp_lot_inquiry
wp_lot_resources
wp_lot
wp_property

Browser metrics Passed 4 tests

Property Lot Management System: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,804 ▲20816.14 ▲0.6310.66 ▼0.0844.62 ▼1.65
Dashboard /wp-admin3,087 ▲1506.32 ▲0.19156.09 ▲2.69123.12 ▲8.00
Posts /wp-admin/edit.php2,869 ▲1302.67 ▼0.0581.04 ▲15.65100.81 ▲11.85
Add New Post /wp-admin/post-new.php1,583 ▼10018.64 ▲0.11415.52 ▼11.69122.12 ▲15.51
Media Library /wp-admin/upload.php1,948 ▲1415.26 ▲0.22142.64 ▼12.43131.16 ▲18.50
Add Lot /wp-admin/admin.php?page=add_lot2,7928.13195.86138.50
Add Property /wp-admin/admin.php?page=add_property2,3918.01177.85134.80
Property /wp-admin/admin.php?page=list_property1,5472.6771.6984.71
Edit Lot /wp-admin/admin.php?page=edit_lot1,6002.7969.6580.64
Install Plugins /wp-admin/themes.php?page=plms-install-plugins1,3662.5860.7172.78
Lot /wp-admin/admin.php?page=list_lot1,6002.7970.3978.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+284
    Undefined variable: lot_title
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+291
    Undefined variable: lot_no
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+295
    Undefined variable: lot_area
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+306
    Undefined variable: lot_status
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+316
    Undefined variable: lot_eoi_user
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+381
    Undefined variable: lot_price
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+386
    Undefined variable: lot_house_size
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+390
    Undefined variable: lot_build_price
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+395
    Undefined variable: lot_house_design
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+399
    Undefined variable: lot_exc_builder
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+404
    Undefined variable: lot_package_price
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+408
    Undefined variable: lot_th_hl
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+413
    Undefined variable: lot_type
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+417
    Undefined variable: lot_legal_rep
    • > GET request to /wp-admin/admin.php?page=add_lot
    • > Notice in wp-content/plugins/plms/admin/lot-add.php+427
    Undefined variable: lot_description
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=plms-install-plugins
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/plms/property-lot.php+329
    Undefined index: txtid
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_lot
    • > Notice in wp-content/plugins/plms/admin/lot-edit.php+2
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+202
    Undefined variable: pro_title
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+207
    Undefined variable: pro_total_lots
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+212
    Undefined variable: pro_cons_timeline
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+217
    Undefined variable: pro_start_price
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+222
    Undefined variable: pro_rental_app
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+227
    Undefined variable: pro_site_area
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+254
    Undefined variable: pro_description
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+264
    Undefined variable: pro_country
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+272
    Undefined variable: pro_state
    • > GET request to /wp-admin/admin.php?page=add_property
    • > Notice in wp-content/plugins/plms/admin/property-add.php+279
    Undefined variable: pro_city

SRP 50% 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
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/plms/class-tgm-plugin-activation.php:161
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/plms/admin/lot-edit.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/plms/admin/property-add.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/plms/class-tgm-plugin-activation.php:161
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/plms/admin/lot-add.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: realestate, lot, property

plms/property-lot.php 92% from 13 tests

The entry point to "Property Lot Management System" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("plms.php" instead of "property-lot.php")

Code Analysis Passed 3 tests

File types Passed 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
Everything looks great! No dangerous files found in this plugin4,938 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP108968273,498
CSS240501,226
JavaScript2398214

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity46.00
▷ Minimum class complexity5.00
▷ Maximum class complexity112.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods84
▷ Static methods11.19%
▷ Public methods7892.86%
▷ Protected methods67.14%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
9 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/alpha20.png0.91KB0.09KB▼ 89.70%
images/fullscreen-exit.png0.41KB0.30KB▼ 25.71%
images/arrow-up.png1.00KB0.11KB▼ 89.01%
images/alpha50.png0.91KB0.09KB▼ 89.70%
images/fullscreen.png0.42KB0.32KB▼ 23.33%