10% wp-legal-cases

Code Review | WP Legal Cases

WordPress plugin WP Legal Cases scored10%from 54 tests.

About plugin

  • Plugin page: wp-legal-cases
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: May 13, 2013
  • Latest release: Nov 3, 2016
  • Number of updates: 32
  • Update frequency: every 39.8 days
  • Top authors: michaellautman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,633 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-legal-cases/includes/cases-output-settings.php+7
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.39ms] Passed 4 tests

Server-side resources used by WP Legal Cases
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.80 ▲0.63
Dashboard /wp-admin3.31 ▲0.0048.41 ▼2.39
Posts /wp-admin/edit.php3.36 ▲0.0044.00 ▲1.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.04 ▼5.24
Media Library /wp-admin/upload.php3.23 ▲0.0034.68 ▲1.43

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Legal Cases
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.041.82 ▼0.0744.29 ▼0.31
Dashboard /wp-admin2,206 ▲185.86 ▲1.00110.60 ▼5.1542.46 ▼1.67
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0134.18 ▼6.5333.48 ▼0.78
Add New Post /wp-admin/post-new.php1,542 ▼018.47 ▲0.15633.37 ▼7.7449.75 ▼0.66
Media Library /wp-admin/upload.php1,385 ▼04.19 ▼0.0299.16 ▲0.1142.04 ▼4.53

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-legal-cases/includes/register-cases-taxonomies.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-legal-cases/wp-legal-cases.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-legal-cases/includes/cases-post-type.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-legal-cases/templates/archive-case.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-legal-cases/includes/cases-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-legal-cases/includes/cases-output-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function piklist() in wp-content/plugins/wp-legal-cases/parts/meta-boxes/cases-meta.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-legal-cases/includes/cases-enqueue-styles.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-legal-cases/templates/single-case.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function piklist() in wp-content/plugins/wp-legal-cases/parts/settings/cases-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-legal-cases/archive-case.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in wp-legal-cases/assets to your readme.txt
The official readme.txt is a good inspiration

wp-legal-cases/wp-legal-cases.php Passed 13 tests

The principal PHP file in "WP Legal Cases" v. 2.0.2 is loaded by WordPress automatically on each request
101 characters long description:
Designed for law firms using WordPress: Add a custom post type that highlights your important cases.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin917 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP16221199736
CSS285162181

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity18.00
▷ Minimum class complexity8.00
▷ Maximum class complexity28.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods753.85%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin