10% family-law-express-news-widget

Code Review | Family Law Express News

WordPress plugin Family Law Express News scored10%from 54 tests.

About plugin

  • Plugin page: family-law-expres...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.2
  • WordPress version: 6.3.1
  • First release: Apr 8, 2014
  • Latest release: Apr 9, 2014
  • Number of updates: 28
  • Update frequency: every 0.0 days
  • Top authors: jacob.romano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,541 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/family-law-express-news-widget/family-law-express-headlines.php+328
    Function create_function() is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼53.93ms] Passed 4 tests

An overview of server-side resources used by Family Law Express News
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.326.13 ▼34.38
Dashboard /wp-admin2.16 ▼1.145.67 ▼39.83
Posts /wp-admin/edit.php2.16 ▼1.197.04 ▼41.94
Add New Post /wp-admin/post-new.php2.16 ▼3.726.36 ▼99.55
Media Library /wp-admin/upload.php2.16 ▼1.065.60 ▼30.24

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Family Law Express News
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.131.67 ▼0.1442.68 ▼0.28
Dashboard /wp-admin2,209 ▲185.86 ▲0.98100.81 ▼9.1141.48 ▼0.77
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0136.55 ▼7.5435.42 ▼2.89
Add New Post /wp-admin/post-new.php1,520 ▲123.20 ▼0.16686.38 ▼7.4755.88 ▲8.49
Media Library /wp-admin/upload.php1,385 ▼04.20 ▼0.04107.20 ▲5.0746.95 ▼0.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/family-law-express-news-widget/family-law-express-headlines.php+328
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_family_law_express_headlines
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/family-law-express-news-widget/includes/admin.php
    • > /wp-content/plugins/family-law-express-news-widget/includes/widget.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/family-law-express-news-widget/family-law-express-headlines.php:14
    • > PHP Notice
      Undefined variable: widget_title in wp-content/plugins/family-law-express-news-widget/includes/widget.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 27 tag instead of maximum 10
The official readme.txt is a good inspiration

family-law-express-news-widget/family-law-express-headlines.php 92% from 13 tests

The main PHP script in "Family Law Express News" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("family-law-express-news-widget.php" instead of "family-law-express-headlines.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected483 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP37484280
JavaScript22820108
PO File1191955
CSS2151340

PHP code Passed 2 tests

Analyzing 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.30
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png54.34KB20.58KB▼ 62.13%
screenshot-4.png14.89KB6.00KB▼ 59.74%
screenshot-3.png13.08KB5.34KB▼ 59.22%
screenshot-2.png11.97KB5.08KB▼ 57.53%
includes/images/250x150v3.png10.27KB5.59KB▼ 45.54%