83% oxyplug-prefetch

Code Review | Oxyplug Prefetch & Prerender

WordPress plugin Oxyplug Prefetch & Prerender scored83%from 54 tests.

About plugin

  • Plugin page: oxyplug-prefetch
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2022
  • Latest release: Nov 29, 2023
  • Number of updates: 25
  • Update frequency: every 27.4 days
  • Top authors: oxyplug (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.59ms] Passed 4 tests

A check of server-side resources used by Oxyplug Prefetch & Prerender
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2145.69 ▲2.27
Dashboard /wp-admin3.48 ▲0.1847.84 ▼10.36
Posts /wp-admin/edit.php3.59 ▲0.2447.34 ▼2.89
Add New Post /wp-admin/post-new.php6.09 ▲0.2086.00 ▼7.37
Media Library /wp-admin/upload.php3.40 ▲0.1738.29 ▲2.36
Oxyplug Prefetch & Prerender /wp-admin/tools.php?page=oxy-prefetch-settings3.3935.50

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Oxyplug Prefetch & Prerender
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲15913.97 ▼0.149.45 ▲7.5048.15 ▲3.79
Dashboard /wp-admin2,226 ▲465.51 ▼0.1088.80 ▼11.3842.64 ▼1.03
Posts /wp-admin/edit.php2,135 ▲352.02 ▲0.0438.30 ▼0.9634.54 ▼6.77
Add New Post /wp-admin/post-new.php6,348 ▲4,81818.98 ▼4.02809.39 ▲122.2062.02 ▲10.16
Media Library /wp-admin/upload.php1,434 ▲314.19 ▼0.02100.74 ▼1.5743.19 ▼0.05
Oxyplug Prefetch & Prerender /wp-admin/tools.php?page=oxy-prefetch-settings9642.1627.4235.34

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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oxyplug-prefetch/oxy-prefetch.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

oxyplug-prefetch/oxy-prefetch.php 69% from 13 tests

The primary PHP file in "Oxyplug Prefetch & Prerender" version 2.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 222 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("oxyplug-prefetch.php" instead of "oxy-prefetch.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.3" instead of "4.9")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,682 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2126122846
JavaScript2608391
CSS17112324
PO File137087
SVG20234

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity150.00
▷ Minimum class complexity150.00
▷ Maximum class complexity150.00
Average method complexity7.21
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants00.00%
▷ Class constants19100.00%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin