90% lh-fresh-content

Code Review | LH Fresh Content

WordPress plugin LH Fresh Content scored90%from 54 tests.

About plugin

  • Plugin page: lh-fresh-content
  • Plugin version: 1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Aug 14, 2022
  • Number of updates: 5
  • Update frequency: every 174.6 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /822 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.65ms] Passed 4 tests

Analyzing server-side resources used by LH Fresh Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.21 ▲1.25
Dashboard /wp-admin3.39 ▲0.0947.16 ▲0.83
Posts /wp-admin/edit.php3.51 ▲0.1542.39 ▼6.27
Add New Post /wp-admin/post-new.php5.97 ▲0.0978.91 ▼23.40
Media Library /wp-admin/upload.php3.32 ▲0.0934.24 ▼1.76

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

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

Browser metrics Passed 4 tests

Checking browser requirements for LH Fresh Content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.37 ▼0.252.65 ▲1.1743.86 ▲8.29
Dashboard /wp-admin2,192 ▲115.55 ▼0.1181.71 ▼30.2035.41 ▼8.27
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0234.47 ▼7.4633.33 ▼3.75
Add New Post /wp-admin/post-new.php1,526 ▼023.21 ▲0.00667.23 ▼5.7663.02 ▼2.04
Media Library /wp-admin/upload.php1,400 ▲34.13 ▼0.0396.27 ▼16.4342.72 ▼4.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
7 plugin tags: application, reload, page, force, refresh...

lh-fresh-content/lh-fresh-content.php 92% from 13 tests

"LH Fresh Content" version 1.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 detected765 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP336842412
JavaScript221941353

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.47
Average class complexity39.00
▷ Minimum class complexity36.00
▷ Maximum class complexity42.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods2262.86%
▷ Public methods35100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin