83% lexicata

Code Review | Lexicata

WordPress plugin Lexicata scored83%from 54 tests.

About plugin

  • Plugin page: lexicata
  • Plugin version: 1.0.16
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.4
  • WordPress version: 6.3.1
  • First release: Sep 10, 2015
  • Latest release: Jan 9, 2018
  • Number of updates: 48
  • Update frequency: every 17.8 days
  • Top authors: lexicata (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,293 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

A check of server-side resources used by Lexicata
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2540.40 ▼3.71
Dashboard /wp-admin3.57 ▲0.2646.92 ▼1.25
Posts /wp-admin/edit.php3.68 ▲0.3253.33 ▲6.60
Add New Post /wp-admin/post-new.php6.16 ▲0.2789.05 ▼7.26
Media Library /wp-admin/upload.php3.49 ▲0.2637.64 ▲2.37
Lexicata Settings /wp-admin/options-general.php?page=lexicata_form_settings3.5042.37

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
lexicata_form_version

Browser metrics Passed 4 tests

A check of browser resources used by Lexicata
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲12214.00 ▼0.275.20 ▲3.2236.70 ▼5.32
Dashboard /wp-admin2,214 ▲294.83 ▼1.0397.33 ▼3.3237.46 ▼6.76
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0441.84 ▲2.4434.40 ▼3.06
Add New Post /wp-admin/post-new.php1,521 ▲723.32 ▲5.60680.31 ▲51.9563.66 ▼2.18
Media Library /wp-admin/upload.php1,396 ▲114.17 ▼0.0496.48 ▼3.7843.43 ▼0.55
Lexicata Settings /wp-admin/options-general.php?page=lexicata_form_settings1,1143.0949.9568.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • lexicata_form_version
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/lexicata/includes/templates/form.php:2

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: law firm, lead tracking, contact form, plugin, contact...

lexicata/lexicata-form.php 77% from 13 tests

"Lexicata" version 1.0.16's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.9" instead of "4.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("lexicata.php" instead of "lexicata-form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,154 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP92806141,098
JavaScript516656

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity29.60
▷ Minimum class complexity5.00
▷ Maximum class complexity61.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods52
▷ Static methods47.69%
▷ Public methods4586.54%
▷ Protected methods35.77%
▷ Private methods47.69%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/templates/images/lexicata-logo-169x75.png6.66KB2.75KB▼ 58.73%
includes/templates/images/lexicata-logo-200x100.png6.99KB2.69KB▼ 61.50%