68% lawpress

Code Review | LawPress - Law Firm Website Management

WordPress plugin LawPress - Law Firm Website Management scored 68% from 54 tests.

About plugin

  • Plugin page: lawpress
  • Plugin version: 1.4.5
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 6.3.1
  • First release: Aug 11, 2019
  • Latest release: Apr 16, 2022
  • Number of updates: 23
  • Update frequency: every 42.6 days
  • Top authors: ivanchernyakov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,444 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.67MB] [CPU: ▲8.06ms] 75% from 4 tests

A check of server-side resources used by LawPress - Law Firm Website Management
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 981.17ms on /wp-admin/plugins.php?page=tgmpa-install-plugins)
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6247.22 ▲2.65
Dashboard /wp-admin3.99 ▲0.6957.70 ▲6.41
Posts /wp-admin/edit.php4.03 ▲0.6858.44 ▲10.52
Add New Post /wp-admin/post-new.php6.71 ▲0.82109.67 ▲15.28
Media Library /wp-admin/upload.php3.91 ▲0.6848.05 ▲12.66
Practice Areas /wp-admin/edit.php?post_type=lp_practice_area3.9749.09
Add New /wp-admin/post-new.php?post_type=lp_practice_area4.0259.95
Attorneys /wp-admin/edit.php?post_type=lp_attorney3.9748.76
Add New /wp-admin/post-new.php?post_type=lp_case4.0258.28
Cases /wp-admin/edit.php?post_type=lp_case3.9746.24
Add New /wp-admin/post-new.php?post_type=lp_shortcode3.9753.12
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins4.13981.17
Add New /wp-admin/post-new.php?post_type=lp_attorney4.0660.57
Law Shortcodes /wp-admin/edit.php?post_type=lp_shortcode4.0049.67
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius4.2745.35

Server storage [IO: ▲6.23MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 219 new files
Database: no new tables, 12 new options
New WordPress options
lawpress_review_notice
fs_active_plugins
db_upgraded
can_compress_scripts
widget_recent-posts
lawpress_its_review_time
fs_gdpr
fs_debug_mode
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for LawPress - Law Firm Website Management
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,129 ▲39413.58 ▼0.728.68 ▲6.6827.58 ▼17.60
Dashboard /wp-admin2,404 ▲2195.87 ▼0.03101.05 ▼14.8547.46 ▼1.42
Posts /wp-admin/edit.php2,298 ▲2092.22 ▲0.2342.17 ▲6.1542.81 ▲8.02
Add New Post /wp-admin/post-new.php1,683 ▲16918.51 ▲1.04595.61 ▼93.5857.22 ▲0.11
Media Library /wp-admin/upload.php1,594 ▲2064.27 ▲0.01101.27 ▼13.5348.18 ▲0.00
Practice Areas /wp-admin/edit.php?post_type=lp_practice_area1,2682.1336.1538.88
Add New /wp-admin/post-new.php?post_type=lp_practice_area2,3477.57240.2775.57
Attorneys /wp-admin/edit.php?post_type=lp_attorney1,2682.1436.2037.49
Add New /wp-admin/post-new.php?post_type=lp_case2,3437.69168.6860.93
Cases /wp-admin/edit.php?post_type=lp_case1,2712.1337.0738.89
Add New /wp-admin/post-new.php?post_type=lp_shortcode1,6812.5854.5938.65
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,3711.8130.5635.83
Add New /wp-admin/post-new.php?post_type=lp_attorney2,3477.70159.4865.48
Law Shortcodes /wp-admin/edit.php?post_type=lp_shortcode1,2672.1637.4936.32
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,2981.7027.8229.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/lawpress/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 12 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_active_plugins
    • fs_gdpr
    • theysaidso_admin_options
    • lawpress_review_notice
    • fs_debug_mode
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lawpress/admin/partials/lawpress-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/lawpress/includes/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: law, lawyer, law firm, attorney, solicitor...

lawpress/lawpress.php Passed 13 tests

The entry point to "LawPress - Law Firm Website Management" version 1.4.5 is a PHP file that has certain tags in its header comment area
75 characters long description:
LawPress is an all-in-one law data plugin that helps law firms manage site.

Code Analysis 97% from 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 plugin49,410 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1228,10418,60734,692
SVG30128,891
CSS20126752,289
JavaScript75281,0742,204
XML332481,093
Markdown1680214
JSON10027

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity77.64
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,288
▷ Static methods18314.21%
▷ Public methods92071.43%
▷ Protected methods382.95%
▷ Private methods33025.62%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants127
▷ Global constants9977.95%
▷ Class constants2822.05%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/testimonials.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/locations.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/carousel.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/advanced-settings.png9.16KB5.26KB▼ 42.58%