84% prefetch-visible-links

Code Review | Prefetch visible links

WordPress plugin Prefetch visible links scored84%from 54 tests.

About plugin

  • Plugin page: prefetch-visible-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 30, 2018
  • Latest release: Nov 30, 2018
  • Number of updates: 14
  • Update frequency: N/A
  • Top authors: Cawa-93 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /702 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.04ms] Passed 4 tests

Analyzing server-side resources used by Prefetch visible links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.14 ▼2.67
Dashboard /wp-admin3.31 ▲0.0147.14 ▼4.54
Posts /wp-admin/edit.php3.36 ▲0.0146.96 ▼3.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.00 ▼1.45
Media Library /wp-admin/upload.php3.24 ▲0.0135.67 ▼0.29

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Prefetch visible links
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲13713.83 ▼0.5410.87 ▲9.2344.20 ▲2.00
Dashboard /wp-admin2,195 ▲185.67 ▲0.0385.92 ▼8.9240.91 ▼1.17
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0038.06 ▼0.0235.69 ▲1.49
Add New Post /wp-admin/post-new.php1,526 ▼017.62 ▲0.04695.86 ▲11.5860.81 ▲3.59
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.01100.77 ▼1.2449.06 ▲0.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prefetch-visible-links/admin/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
The official readme.txt might help

prefetch-visible-links/prefetch.php 92% from 13 tests

The entry point to "Prefetch visible links" version 1.0.4 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("prefetch-visible-links.php" instead of "prefetch.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin84 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1111846
PHP2131538

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
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
Namespaces1
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%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.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