90% lh-css-dates-and-times

Code Review | LH CSS Dates and Times

WordPress plugin LH CSS Dates and Times scored90%from 54 tests.

About plugin

  • Plugin page: lh-css-dates-and-...
  • Plugin version: 1.11
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Aug 4, 2022
  • Number of updates: 13
  • Update frequency: every 134.3 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.44ms] Passed 4 tests

A check of server-side resources used by LH CSS Dates and Times
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0545.73 ▼0.91
Dashboard /wp-admin3.32 ▲0.0149.64 ▼2.28
Posts /wp-admin/edit.php3.37 ▲0.0151.14 ▼5.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.91 ▼1.00
Media Library /wp-admin/upload.php3.24 ▲0.0142.46 ▲4.91

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

LH CSS Dates and Times: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.71 ▲0.513.33 ▲1.5344.88 ▼4.94
Dashboard /wp-admin2,198 ▲185.62 ▼0.0586.75 ▼8.2342.94 ▲3.78
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0536.68 ▼4.6933.77 ▼4.84
Add New Post /wp-admin/post-new.php1,526 ▼223.49 ▲0.47691.07 ▲0.3163.92 ▲7.27
Media Library /wp-admin/upload.php1,403 ▼04.19 ▲0.03109.50 ▲3.1847.74 ▲1.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: dates, css, design, styles, personalisation

lh-css-dates-and-times/lh-css-dates-and-times.php 92% from 13 tests

"LH CSS Dates and Times" version 1.11's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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 detected295 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP317926166
JavaScript11190129

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity20.00
▷ Minimum class complexity4.00
▷ Maximum class complexity36.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods541.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There are no PNG files in this plugin