10% legal-news-headlines

Code Review | Legal News Headlines

WordPress plugin Legal News Headlines scored10%from 54 tests.

About plugin

  • Plugin page: legal-news-headlines
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Aug 10, 2012
  • Latest release: Aug 10, 2012
  • Number of updates: 8
  • Update frequency: every 42.0 days
  • Top authors: troycobb (87.5%)definition6 (25%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,870 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/legal-news-headlines/legal-news-headlines.php+350
    Function create_function() is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼59.06ms] Passed 4 tests

A check of server-side resources used by Legal News Headlines
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.53 ▼36.29
Dashboard /wp-admin2.17 ▼1.187.25 ▼61.02
Posts /wp-admin/edit.php2.17 ▼1.195.82 ▼43.67
Add New Post /wp-admin/post-new.php2.17 ▼3.726.55 ▼95.26
Media Library /wp-admin/upload.php2.17 ▼1.065.93 ▼33.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_legal_news_headlines
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Legal News Headlines
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.68 ▼0.611.82 ▲0.1540.80 ▲0.75
Dashboard /wp-admin2,221 ▲185.04 ▼0.7498.26 ▼7.1537.64 ▼2.28
Posts /wp-admin/edit.php2,097 ▼32.04 ▲0.0538.40 ▲0.5133.76 ▲0.49
Add New Post /wp-admin/post-new.php1,545 ▼023.08 ▼0.11636.80 ▲4.7568.46 ▼25.28
Media Library /wp-admin/upload.php1,400 ▲34.18 ▼0.03117.16 ▲4.8546.65 ▼2.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/legal-news-headlines/legal-news-headlines.php+350
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_legal_news_headlines

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/legal-news-headlines/includes/widget.php
    • > /wp-content/plugins/legal-news-headlines/includes/admin.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-news-headlines/legal-news-headlines.php on line 10
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/legal-news-headlines/legal-news-headlines.php on line 10
    • > PHP Warning
      include_once(ABSPATHWPINC/class-simplepie.php): failed to open stream: No such file or directory in wp-content/plugins/legal-news-headlines/legal-news-headlines.php on line 10
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHWPINC/class-simplepie.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/legal-news-headlines/legal-news-headlines.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/legal-news-headlines/legal-news-headlines.php:14
    • > PHP Notice
      Undefined variable: widget_title in wp-content/plugins/legal-news-headlines/includes/widget.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 53 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Full administration/customization all from the widget panel.), #2 (Easily customize the widget and use multiple times on your site to align perfectly to your content. You'll see here that there is no branding on the content outside of your site theme.), #3 (Seamlessly integrate with your existing WordPress theme.), #4 (Another example with preview content turned on.), #5 (An example without post preview content.), #6 (One final example for good measure!)
Please take inspiration from this readme.txt

legal-news-headlines/legal-news-headlines.php Passed 13 tests

This is the main PHP file of "Legal News Headlines" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
111 characters long description:
Widget that dipslays legal news RSS feed titles from Lawyers.com, along with news feeds from the installed site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected512 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP37584310
JavaScript22820108
PO File1201954
CSS2151340

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity5.56
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.32MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png19.22KB9.64KB▼ 49.86%
screenshot-3.png41.07KB14.43KB▼ 64.86%
screenshot-4.png59.32KB24.92KB▼ 57.98%
screenshot-2.png47.45KB18.32KB▼ 61.40%
screenshot-1.png143.15KB44.27KB▼ 69.07%