84% lh-prefetch-and-render

Code Review | LH Prefetch and Render

WordPress plugin LH Prefetch and Render scored84%from 54 tests.

About plugin

  • Plugin page: lh-prefetch-and-r...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 3, 2016
  • Latest release: Aug 4, 2017
  • Number of updates: 5
  • Update frequency: every 457.2 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /905 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.49ms] Passed 4 tests

Analyzing server-side resources used by LH Prefetch and Render
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.50 ▲5.93
Dashboard /wp-admin3.32 ▼0.0343.84 ▼20.76
Posts /wp-admin/edit.php3.37 ▲0.0146.46 ▲3.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.91 ▼15.74
Media Library /wp-admin/upload.php3.24 ▲0.0135.26 ▲3.39

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for LH Prefetch and Render
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.131.70 ▼0.3041.92 ▼1.62
Dashboard /wp-admin2,206 ▲185.87 ▲0.99108.14 ▼10.7939.14 ▼6.53
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0238.79 ▲4.0535.07 ▼0.96
Add New Post /wp-admin/post-new.php1,514 ▼1417.62 ▼5.60672.12 ▼0.5358.06 ▲6.13
Media Library /wp-admin/upload.php1,382 ▼64.23 ▲0.0695.40 ▼2.9842.89 ▲0.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lh-prefetch-and-render/lh-prefetch-and-render.php:54

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Requires at least: Version not formatted correctly
You can look at the official readme.txt

lh-prefetch-and-render/lh-prefetch-and-render.php Passed 13 tests

The entry point to "LH Prefetch and Render" version 1.01 is a PHP file that has certain tags in its header comment area
26 characters long description:
Adds prefetch meta to head

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP128835

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin