84% legal-plus

Code Review | Legal +

WordPress plugin Legal + scored84%from 54 tests.

About plugin

  • Plugin page: legal-plus
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 30, 2015
  • Latest release: Mar 22, 2016
  • Number of updates: 10
  • Update frequency: every 8.3 days
  • Top authors: jmraya (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /7,271 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.04MB] [CPU: ▼6.92ms] Passed 4 tests

A check of server-side resources used by Legal +
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.04 ▲4.01
Dashboard /wp-admin3.34 ▼0.0044.75 ▼10.10
Posts /wp-admin/edit.php3.45 ▲0.1043.39 ▼0.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.54 ▼12.15
Media Library /wp-admin/upload.php3.26 ▲0.0431.73 ▼5.17
legal+ /wp-admin/options-general.php?page=legal_plus_settings3.2836.34

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 10 new options
New WordPress options
legalplus_page_notice
can_compress_scripts
db_upgraded
theysaidso_admin_options
legalplus_COOKIES_TEXT
widget_theysaidso_widget
legalplus_page_privacity
widget_recent-comments
widget_recent-posts
legalplus_bottom_bar

Browser metrics Passed 4 tests

This is an overview of browser requirements for Legal +
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲8114.29 ▼0.062.50 ▲0.7243.51 ▲2.69
Dashboard /wp-admin2,199 ▲225.51 ▼0.1590.59 ▲1.3942.95 ▲5.16
Posts /wp-admin/edit.php2,104 ▲222.02 ▲0.0034.02 ▼1.3936.05 ▼2.54
Add New Post /wp-admin/post-new.php1,531 ▼222.67 ▲4.53643.93 ▼15.9156.58 ▼13.21
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.1095.32 ▼17.1143.12 ▼7.96
legal+ /wp-admin/options-general.php?page=legal_plus_settings1,0402.0422.4129.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • legalplus_COOKIES_TEXT
    • can_compress_scripts
    • legalplus_bottom_bar
    • legalplus_page_privacity
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • legalplus_page_notice
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/legal-plus/legalplus.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/legal-plus/legalplus_admin.php:157
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/legal-plus/templates/legalplus_header.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: cookies, legal

legal-plus/legalplus.php 92% from 13 tests

Analyzing the main PHP file in "Legal +" version 1.0
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("legal-plus.php" instead of "legalplus.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin649 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33615428
JavaScript1151132
CSS20089

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin