66% instant-page-load

Code Review | Instant Page Load

WordPress plugin Instant Page Load scored66%from 54 tests.

About plugin

  • Plugin page: instant-page-load
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 11, 2022
  • Latest release: Mar 22, 2023
  • Number of updates: 23
  • Update frequency: every 5.7 days
  • Top authors: AL Imran Akash (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

70+ active /2,397 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲5.45MB] [CPU: ▲28.63ms] 75% from 4 tests

This is a short check of server-side resources used by Instant Page Load
The following require your attention
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.45MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.27 ▲5.8168.16 ▲27.13
Dashboard /wp-admin9.29 ▲5.9979.82 ▲28.11
Posts /wp-admin/edit.php9.30 ▲5.9486.17 ▲34.96
Add New Post /wp-admin/post-new.php9.93 ▲4.04125.14 ▲24.31
Media Library /wp-admin/upload.php9.30 ▲6.0777.72 ▲40.73
Freemius Debug [v.2.5.2] /wp-admin/admin.php?page=freemius9.3063.80

Server storage [IO: ▲3.79MB] [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: 240 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
fs_gdpr
fs_debug_mode
fs_active_plugins
widget_recent-comments
widget_theysaidso_widget
db_upgraded
fs_accounts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Instant Page Load
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲10313.69 ▼0.621.75 ▼0.2729.30 ▼14.04
Dashboard /wp-admin2,268 ▲805.91 ▲0.99114.03 ▲0.5369.62 ▲28.46
Posts /wp-admin/edit.php2,163 ▲742.18 ▲0.1740.40 ▲2.1538.20 ▲3.24
Add New Post /wp-admin/post-new.php1,568 ▲4922.23 ▼0.84689.12 ▼41.7242.85 ▼9.46
Media Library /wp-admin/upload.php1,462 ▲744.23 ▲0.10104.09 ▼15.1596.62 ▲49.22
Freemius Debug [v.2.5.2] /wp-admin/admin.php?page=freemius1,0912.1124.9728.06

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/instant-page-load/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • fs_active_plugins
    • db_upgraded
    • widget_theysaidso_widget
    • fs_gdpr
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-posts
    • fs_accounts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-content/plugins/xrely-autocomplete/class.xrely-admin.php+329
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Warning in wp-content/plugins/xrely-autocomplete/class.xrely.php+10
    include(wp-content/plugins/xrely-autocomplete/view/front.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Warning in wp-content/plugins/xrely-autocomplete/class.xrely.php+10
    include(): Failed opening 'wp-content/plugins/xrely-autocomplete/view/front.php' for inclusion (include_path='.:/usr/share/php')

SRP 50% from 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 following issues need your attention
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instant-page-load/views/pro-features.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/instant-page-load/functions/helpers.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/instant-page-load/functions/helpers.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/instant-page-load/functions/helpers.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/instant-page-load/functions/helpers.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/instant-page-load/functions/helpers.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/instant-page-load/functions/helpers.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

instant-page-load/wp-instant-page-load.php 69% from 13 tests

The main file in "Instant Page Load" v. 1.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("instant-page-load.php" instead of "wp-instant-page-load.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Git Repository: Please do not include Git repositories in your plugin
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected36,916 lines of code in 185 files:
LanguageFilesBlank linesComment linesLines of code
PHP1478,57517,72035,241
CSS2221958
JavaScript104359414
Markdown2680215
JSON40088

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity72.13
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes68
▷ Abstract classes45.88%
▷ Concrete classes6494.12%
▷ Final classes11.56%
Methods1,443
▷ Static methods19813.72%
▷ Public methods1,05473.04%
▷ Protected methods191.32%
▷ Private methods37025.64%
Functions105
▷ Named functions10297.14%
▷ Anonymous functions32.86%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.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
7 PNG files occupy 0.36MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/survey.png7.31KB3.08KB▼ 57.88%
assets/img/Stop Front-end page loading.png135.02KB49.60KB▼ 63.26%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/img/Works Like React.png35.50KB14.08KB▼ 60.34%