10% prerender-and-prefetch

Code Review | Prerender and Prefetch

WordPress plugin Prerender and Prefetch scored10%from 54 tests.

About plugin

  • Plugin page: prerender-and-pre...
  • Plugin version: 0.93
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Nov 12, 2012
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: frantorres (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,733 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5747
    Function add_option was called with an argument that is deprecated since version 2.3.0 with no alternative available.

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.68ms] Passed 4 tests

This is a short check of server-side resources used by Prerender and Prefetch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0624.16 ▼17.86
Dashboard /wp-admin3.37 ▲0.0749.18 ▼5.93
Posts /wp-admin/edit.php3.43 ▲0.0761.85 ▲12.70
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.14 ▼12.69
Media Library /wp-admin/upload.php3.30 ▲0.0741.17 ▲1.75
Prerender and Prefetch /wp-admin/options-general.php?page=prerenderap3.2430.44

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
prerenderap
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Prerender and Prefetch
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲1014.38 ▼0.271.78 ▼0.1150.90 ▲3.62
Dashboard /wp-admin2,202 ▲255.61 ▲0.0390.46 ▼13.1940.50 ▼5.44
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0539.08 ▼1.1835.94 ▼1.76
Add New Post /wp-admin/post-new.php1,531 ▼623.26 ▲5.09676.44 ▲35.4355.62 ▼21.76
Media Library /wp-admin/upload.php1,407 ▲44.21 ▲0.03112.61 ▲12.7549.38 ▲2.36
Prerender and Prefetch /wp-admin/options-general.php?page=prerenderap1,2392.2927.5031.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 did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=prerenderap
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=prerenderap
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prerender-and-prefetch/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/prerender-and-prefetch/prerenderap.php:33

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: page, load, preload, speed, prefetch...

prerender-and-prefetch/prerenderap.php 85% from 13 tests

The entry point to "Prerender and Prefetch" version 0.93 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 143 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("prerender-and-prefetch.php" instead of "prerenderap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected275 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36886275

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.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