63% prerender

Code Review | Prerender Plugin

WordPress plugin Prerender Plugin scored63%from 54 tests.

About plugin

  • Plugin page: prerender
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.4
  • WordPress version: 6.3.1
  • First release: Oct 3, 2019
  • Latest release: Jan 6, 2020
  • Number of updates: 14
  • Update frequency: every 8.5 days
  • Top authors: hekkup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,205 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼6.33MB] [CPU: ▼1,293,860.12ms] Passed 4 tests

A check of server-side resources used by Prerender Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0842.09 ▼1.56
Dashboard /wp-admin3.42 ▼25.5851.88 ▼5,175,416.85
Posts /wp-admin/edit.php3.54 ▲0.1453.39 ▲0.33
Add New Post /wp-admin/post-new.php6.02 ▲0.0988.06 ▼22.38
Media Library /wp-admin/upload.php3.35 ▲0.0740.89 ▲4.91
Prerender /wp-admin/options-general.php?page=prerender3.2934.42

Server storage [IO: ▲0.20MB] [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: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Prerender Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.47 ▼0.838.73 ▲7.0929.83 ▼10.69
Dashboard /wp-admin2,205 ▲315.57 ▼0.1090.80 ▲1.7648.14 ▲7.26
Posts /wp-admin/edit.php2,110 ▲101.98 ▼0.0135.03 ▲0.1342.42 ▲7.47
Add New Post /wp-admin/post-new.php1,689 ▲16322.51 ▼1.00628.41 ▼83.2774.12 ▲23.85
Media Library /wp-admin/upload.php1,410 ▲74.21 ▼0.07107.35 ▲3.2752.78 ▲6.51
Prerender /wp-admin/options-general.php?page=prerender8621.9922.0735.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/prerender/includes/class-prerender-deactivator.php+37
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=prerender
    • > Notice in wp-content/plugins/prerender/admin/class-prerender-admin.php+124
    Trying to access array offset on value of type bool
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=prerender
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=prerender
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/prerender/public/partials/prerender-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/prerender/admin/partials/prerender-admin-display.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: googlebot, html static, prerender io, prerender

prerender/prerender.php Passed 13 tests

The entry point to "Prerender Plugin" version 1.1.1 is a PHP file that has certain tags in its header comment area
37 characters long description:
Enable Googlebots to Render Your Site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin401 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12164585344
CSS391851
JavaScript24546

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.29
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin